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.

+ * + *

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> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserCreds.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listUserCredsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ListUserCreds") + .setHttpMethod("GET") + .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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListUserCredsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + enableUserCredsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/EnableUserCreds") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/databases/*/userCreds/*}:enable", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserCreds.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + disableUserCredsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DisableUserCreds") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/databases/*/userCreds/*}:disable", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserCreds.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + resetUserPasswordMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ResetUserPassword") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserCreds.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteUserCredsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DeleteUserCreds") + .setHttpMethod("DELETE") + .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> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetBackup") @@ -740,6 +1005,7 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -1006,6 +1272,46 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { .build()) .build(); + private static final ApiMethodDescriptor + cloneDatabaseMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/CloneDatabase") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*}/databases:clone", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CloneDatabaseRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private final UnaryCallable createIndexCallable; private final OperationCallable createIndexOperationCallable; @@ -1042,6 +1348,13 @@ public class HttpJsonFirestoreAdminStub 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; @@ -1056,11 +1369,19 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { private final UnaryCallable updateBackupScheduleCallable; private final UnaryCallable deleteBackupScheduleCallable; + private final UnaryCallable cloneDatabaseCallable; + private final OperationCallable + cloneDatabaseOperationCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory 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 HttpJsonFirestoreAdminStub create(FirestoreAdminStubSettings settings) throws IOException { return new HttpJsonFirestoreAdminStub(settings, ClientContext.create(settings)); @@ -1294,6 +1615,84 @@ protected HttpJsonFirestoreAdminStub( return builder.build(); }) .build(); + HttpJsonCallSettings createUserCredsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createUserCredsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getUserCredsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getUserCredsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listUserCredsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listUserCredsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings enableUserCredsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(enableUserCredsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings disableUserCredsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(disableUserCredsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings resetUserPasswordTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(resetUserPasswordMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteUserCredsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteUserCredsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings getBackupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getBackupMethodDescriptor) @@ -1400,6 +1799,28 @@ protected HttpJsonFirestoreAdminStub( return builder.build(); }) .build(); + HttpJsonCallSettings cloneDatabaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(cloneDatabaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .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( @@ -1502,6 +1923,29 @@ protected HttpJsonFirestoreAdminStub( settings.deleteDatabaseOperationSettings(), clientContext, httpJsonOperationsStub); + 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); @@ -1545,6 +1989,15 @@ protected HttpJsonFirestoreAdminStub( deleteBackupScheduleTransportSettings, settings.deleteBackupScheduleSettings(), clientContext); + this.cloneDatabaseCallable = + callableFactory.createUnaryCallable( + cloneDatabaseTransportSettings, settings.cloneDatabaseSettings(), clientContext); + this.cloneDatabaseOperationCallable = + callableFactory.createOperationCallable( + cloneDatabaseTransportSettings, + settings.cloneDatabaseOperationSettings(), + clientContext, + httpJsonOperationsStub); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -1568,6 +2021,13 @@ public static List getMethodDescriptors() { methodDescriptors.add(listDatabasesMethodDescriptor); methodDescriptors.add(updateDatabaseMethodDescriptor); methodDescriptors.add(deleteDatabaseMethodDescriptor); + methodDescriptors.add(createUserCredsMethodDescriptor); + methodDescriptors.add(getUserCredsMethodDescriptor); + methodDescriptors.add(listUserCredsMethodDescriptor); + methodDescriptors.add(enableUserCredsMethodDescriptor); + methodDescriptors.add(disableUserCredsMethodDescriptor); + methodDescriptors.add(resetUserPasswordMethodDescriptor); + methodDescriptors.add(deleteUserCredsMethodDescriptor); methodDescriptors.add(getBackupMethodDescriptor); methodDescriptors.add(listBackupsMethodDescriptor); methodDescriptors.add(deleteBackupMethodDescriptor); @@ -1577,6 +2037,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listBackupSchedulesMethodDescriptor); methodDescriptors.add(updateBackupScheduleMethodDescriptor); methodDescriptors.add(deleteBackupScheduleMethodDescriptor); + methodDescriptors.add(cloneDatabaseMethodDescriptor); return methodDescriptors; } @@ -1718,6 +2179,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; @@ -1770,6 +2266,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/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json b/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json index dcc0dfa2e..b4c178153 100644 --- a/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json +++ b/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json @@ -359,6 +359,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.RoutingParameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.RubySettings", "queryAllDeclaredConstructors": true, @@ -566,6 +602,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.CloneDatabaseMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.CloneDatabaseMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.CloneDatabaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.CloneDatabaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.CreateBackupScheduleRequest", "queryAllDeclaredConstructors": true, @@ -638,6 +710,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.CreateUserCredsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.CreateUserCredsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.DailyRecurrence", "queryAllDeclaredConstructors": true, @@ -683,6 +773,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.Database$CmekConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$CmekConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.Database$ConcurrencyMode", "queryAllDeclaredConstructors": true, @@ -692,6 +800,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.Database$DatabaseEdition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.Database$DatabaseType", "queryAllDeclaredConstructors": true, @@ -710,6 +827,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig$CustomerManagedEncryptionOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig$CustomerManagedEncryptionOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig$GoogleDefaultEncryptionOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig$GoogleDefaultEncryptionOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig$SourceEncryptionOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$EncryptionConfig$SourceEncryptionOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.Database$PointInTimeRecoveryEnablement", "queryAllDeclaredConstructors": true, @@ -719,6 +908,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.Database$SourceInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$SourceInfo$BackupSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$SourceInfo$BackupSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.Database$SourceInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.DeleteBackupRequest", "queryAllDeclaredConstructors": true, @@ -809,6 +1034,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.DeleteUserCredsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.DeleteUserCredsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.DisableUserCredsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.DisableUserCredsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.EnableUserCredsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.EnableUserCredsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.ExportDocumentsMetadata", "queryAllDeclaredConstructors": true, @@ -1088,6 +1367,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.GetUserCredsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.GetUserCredsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.ImportDocumentsMetadata", "queryAllDeclaredConstructors": true, @@ -1151,6 +1448,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.Index$Density", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.Index$IndexField", "queryAllDeclaredConstructors": true, @@ -1439,6 +1745,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.ListUserCredsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.ListUserCredsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.ListUserCredsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.ListUserCredsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.LocationMetadata", "queryAllDeclaredConstructors": true, @@ -1466,6 +1808,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.PitrSnapshot", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.PitrSnapshot$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.Progress", "queryAllDeclaredConstructors": true, @@ -1484,6 +1844,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.ResetUserPasswordRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.ResetUserPasswordRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.RestoreDatabaseMetadata", "queryAllDeclaredConstructors": true, @@ -1592,6 +1970,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.UserCreds", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.UserCreds$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.UserCreds$ResourceIdentity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.UserCreds$ResourceIdentity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.UserCreds$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.WeeklyRecurrence", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.java index d75b8166c..3e9277cbe 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.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,6 +35,7 @@ import com.google.firestore.admin.v1.BackupSchedule; import com.google.firestore.admin.v1.BackupScheduleName; import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; +import com.google.firestore.admin.v1.CloneDatabaseRequest; import com.google.firestore.admin.v1.CollectionGroupName; import com.google.firestore.admin.v1.Database; import com.google.firestore.admin.v1.DatabaseName; @@ -48,9 +49,13 @@ import com.google.firestore.admin.v1.ListDatabasesResponse; import com.google.firestore.admin.v1.ListFieldsResponse; import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.ListUserCredsResponse; import com.google.firestore.admin.v1.LocationName; +import com.google.firestore.admin.v1.PitrSnapshot; import com.google.firestore.admin.v1.ProjectName; import com.google.firestore.admin.v1.RestoreDatabaseRequest; +import com.google.firestore.admin.v1.UserCreds; +import com.google.firestore.admin.v1.UserCredsName; import com.google.longrunning.Operation; import com.google.protobuf.Any; import com.google.protobuf.Duration; @@ -60,6 +65,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; @@ -111,6 +117,8 @@ public void createIndexTest() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); Operation resultOperation = Operation.newBuilder() @@ -164,6 +172,8 @@ public void createIndexTest2() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); Operation resultOperation = Operation.newBuilder() @@ -321,6 +331,8 @@ public void getIndexTest() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); mockService.addResponse(expectedResponse); @@ -366,6 +378,8 @@ public void getIndexTest2() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); mockService.addResponse(expectedResponse); @@ -1032,10 +1046,16 @@ public void createDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1093,10 +1113,16 @@ public void createDatabaseTest2() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1154,10 +1180,16 @@ public void getDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); mockService.addResponse(expectedResponse); @@ -1206,10 +1238,16 @@ public void getDatabaseTest2() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); mockService.addResponse(expectedResponse); @@ -1348,10 +1386,16 @@ public void updateDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1368,10 +1412,16 @@ public void updateDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1408,10 +1458,16 @@ public void updateDatabaseExceptionTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1429,10 +1485,16 @@ public void deleteDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1486,10 +1548,16 @@ public void deleteDatabaseTest2() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1535,6 +1603,648 @@ public void deleteDatabaseExceptionTest2() throws Exception { } } + @Test + public void createUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + + UserCreds actualResponse = client.createUserCreds(parent, userCreds, userCredsId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserCredsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + client.createUserCreds(parent, userCreds, userCredsId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9821/databases/database-9821"; + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + + UserCreds actualResponse = client.createUserCreds(parent, userCreds, userCredsId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserCredsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9821/databases/database-9821"; + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + client.createUserCreds(parent, userCreds, userCredsId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.getUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserCredsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.getUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + + UserCreds actualResponse = client.getUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserCredsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + client.getUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserCredsTest() throws Exception { + ListUserCredsResponse expectedResponse = + ListUserCredsResponse.newBuilder().addAllUserCreds(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + + ListUserCredsResponse actualResponse = client.listUserCreds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserCredsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + client.listUserCreds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserCredsTest2() throws Exception { + ListUserCredsResponse expectedResponse = + ListUserCredsResponse.newBuilder().addAllUserCreds(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9821/databases/database-9821"; + + ListUserCredsResponse actualResponse = client.listUserCreds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserCredsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9821/databases/database-9821"; + client.listUserCreds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enableUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.enableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void enableUserCredsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.enableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enableUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + + UserCreds actualResponse = client.enableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void enableUserCredsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + client.enableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void disableUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.disableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void disableUserCredsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.disableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void disableUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + + UserCreds actualResponse = client.disableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void disableUserCredsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + client.disableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resetUserPasswordTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.resetUserPassword(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resetUserPasswordExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.resetUserPassword(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resetUserPasswordTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + + UserCreds actualResponse = client.resetUserPassword(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resetUserPasswordExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + client.resetUserPassword(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserCredsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + client.deleteUserCreds(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserCredsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.deleteUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserCredsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + + client.deleteUserCreds(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserCredsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3654/databases/database-3654/userCreds/userCred-3654"; + client.deleteUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getBackupTest() throws Exception { Backup expectedResponse = @@ -1811,10 +2521,16 @@ public void restoreDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1830,6 +2546,8 @@ public void restoreDatabaseTest() throws Exception { .setParent(ProjectName.of("[PROJECT]").toString()) .setDatabaseId("databaseId1688905718") .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) + .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build()) + .putAllTags(new HashMap()) .build(); Database actualResponse = client.restoreDatabaseAsync(request).get(); @@ -1863,6 +2581,8 @@ public void restoreDatabaseExceptionTest() throws Exception { .setParent(ProjectName.of("[PROJECT]").toString()) .setDatabaseId("databaseId1688905718") .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) + .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build()) + .putAllTags(new HashMap()) .build(); client.restoreDatabaseAsync(request).get(); Assert.fail("No exception raised"); @@ -2303,4 +3023,81 @@ public void deleteBackupScheduleExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void cloneDatabaseTest() throws Exception { + Database expectedResponse = + Database.newBuilder() + .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setLocationId("locationId1541836720") + .setVersionRetentionPeriod(Duration.newBuilder().build()) + .setEarliestVersionTime(Timestamp.newBuilder().build()) + .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("cloneDatabaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + 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 actualResponse = client.cloneDatabaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void cloneDatabaseExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CloneDatabaseRequest request = + CloneDatabaseRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setDatabaseId("databaseId1688905718") + .setPitrSnapshot(PitrSnapshot.newBuilder().build()) + .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build()) + .putAllTags(new HashMap()) + .build(); + client.cloneDatabaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } } diff --git a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java index 6ef7b2470..b77c01a34 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.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. @@ -34,16 +34,21 @@ import com.google.firestore.admin.v1.BackupScheduleName; import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; +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.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; import com.google.firestore.admin.v1.DeleteBackupScheduleRequest; 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.ExportDocumentsRequest; import com.google.firestore.admin.v1.ExportDocumentsResponse; import com.google.firestore.admin.v1.Field; @@ -53,6 +58,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.ImportDocumentsRequest; import com.google.firestore.admin.v1.Index; import com.google.firestore.admin.v1.IndexName; @@ -66,12 +72,18 @@ 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.PitrSnapshot; import com.google.firestore.admin.v1.ProjectName; +import com.google.firestore.admin.v1.ResetUserPasswordRequest; import com.google.firestore.admin.v1.RestoreDatabaseRequest; import com.google.firestore.admin.v1.UpdateBackupScheduleRequest; 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.AbstractMessage; import com.google.protobuf.Any; @@ -83,6 +95,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; @@ -141,6 +154,8 @@ public void createIndexTest() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); Operation resultOperation = Operation.newBuilder() @@ -192,6 +207,8 @@ public void createIndexTest2() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); Operation resultOperation = Operation.newBuilder() @@ -331,6 +348,8 @@ public void getIndexTest() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); mockFirestoreAdmin.addResponse(expectedResponse); @@ -370,6 +389,8 @@ public void getIndexTest2() throws Exception { Index.newBuilder() .setName(IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString()) .addAllFields(new ArrayList()) + .setMultikey(true) + .setShardCount(-495377042) .build(); mockFirestoreAdmin.addResponse(expectedResponse); @@ -954,10 +975,16 @@ public void createDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1014,10 +1041,16 @@ public void createDatabaseTest2() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1074,10 +1107,16 @@ public void getDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); mockFirestoreAdmin.addResponse(expectedResponse); @@ -1120,10 +1159,16 @@ public void getDatabaseTest2() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); mockFirestoreAdmin.addResponse(expectedResponse); @@ -1244,10 +1289,16 @@ public void updateDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1301,10 +1352,16 @@ public void deleteDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1355,10 +1412,16 @@ public void deleteDatabaseTest2() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1401,6 +1464,568 @@ public void deleteDatabaseExceptionTest2() throws Exception { } } + @Test + public void createUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + + UserCreds actualResponse = client.createUserCreds(parent, userCreds, userCredsId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateUserCredsRequest actualRequest = ((CreateUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(userCreds, actualRequest.getUserCreds()); + Assert.assertEquals(userCredsId, actualRequest.getUserCredsId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createUserCredsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + client.createUserCreds(parent, userCreds, userCredsId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + + UserCreds actualResponse = client.createUserCreds(parent, userCreds, userCredsId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateUserCredsRequest actualRequest = ((CreateUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(userCreds, actualRequest.getUserCreds()); + Assert.assertEquals(userCredsId, actualRequest.getUserCredsId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createUserCredsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + UserCreds userCreds = UserCreds.newBuilder().build(); + String userCredsId = "userCredsId726775445"; + client.createUserCreds(parent, userCreds, userCredsId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.getUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserCredsRequest actualRequest = ((GetUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserCredsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.getUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + UserCreds actualResponse = client.getUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserCredsRequest actualRequest = ((GetUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserCredsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String name = "name3373707"; + client.getUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserCredsTest() throws Exception { + ListUserCredsResponse expectedResponse = + ListUserCredsResponse.newBuilder().addAllUserCreds(new ArrayList()).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + + ListUserCredsResponse actualResponse = client.listUserCreds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserCredsRequest actualRequest = ((ListUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserCredsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]"); + client.listUserCreds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserCredsTest2() throws Exception { + ListUserCredsResponse expectedResponse = + ListUserCredsResponse.newBuilder().addAllUserCreds(new ArrayList()).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListUserCredsResponse actualResponse = client.listUserCreds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserCredsRequest actualRequest = ((ListUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserCredsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + client.listUserCreds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enableUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.enableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + EnableUserCredsRequest actualRequest = ((EnableUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void enableUserCredsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.enableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enableUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + UserCreds actualResponse = client.enableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + EnableUserCredsRequest actualRequest = ((EnableUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void enableUserCredsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String name = "name3373707"; + client.enableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void disableUserCredsTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.disableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableUserCredsRequest actualRequest = ((DisableUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void disableUserCredsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.disableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void disableUserCredsTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + UserCreds actualResponse = client.disableUserCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableUserCredsRequest actualRequest = ((DisableUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void disableUserCredsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String name = "name3373707"; + client.disableUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resetUserPasswordTest() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + UserCreds actualResponse = client.resetUserPassword(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResetUserPasswordRequest actualRequest = ((ResetUserPasswordRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resetUserPasswordExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.resetUserPassword(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resetUserPasswordTest2() throws Exception { + UserCreds expectedResponse = + UserCreds.newBuilder() + .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSecurePassword("securePassword715395890") + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + UserCreds actualResponse = client.resetUserPassword(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResetUserPasswordRequest actualRequest = ((ResetUserPasswordRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resetUserPasswordExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String name = "name3373707"; + client.resetUserPassword(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserCredsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + + client.deleteUserCreds(name); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserCredsRequest actualRequest = ((DeleteUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserCredsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]"); + client.deleteUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserCredsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteUserCreds(name); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserCredsRequest actualRequest = ((DeleteUserCredsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserCredsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String name = "name3373707"; + client.deleteUserCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getBackupTest() throws Exception { Backup expectedResponse = @@ -1641,10 +2266,16 @@ public void restoreDatabaseTest() throws Exception { .setUid("uid115792") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) .setLocationId("locationId1541836720") .setVersionRetentionPeriod(Duration.newBuilder().build()) .setEarliestVersionTime(Timestamp.newBuilder().build()) .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) .setEtag("etag3123477") .build(); Operation resultOperation = @@ -1660,6 +2291,8 @@ public void restoreDatabaseTest() throws Exception { .setParent(ProjectName.of("[PROJECT]").toString()) .setDatabaseId("databaseId1688905718") .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) + .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build()) + .putAllTags(new HashMap()) .build(); Database actualResponse = client.restoreDatabaseAsync(request).get(); @@ -1672,6 +2305,8 @@ public void restoreDatabaseTest() throws Exception { Assert.assertEquals(request.getParent(), actualRequest.getParent()); Assert.assertEquals(request.getDatabaseId(), actualRequest.getDatabaseId()); Assert.assertEquals(request.getBackup(), actualRequest.getBackup()); + Assert.assertEquals(request.getEncryptionConfig(), actualRequest.getEncryptionConfig()); + Assert.assertEquals(request.getTagsMap(), actualRequest.getTagsMap()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1689,6 +2324,8 @@ public void restoreDatabaseExceptionTest() throws Exception { .setParent(ProjectName.of("[PROJECT]").toString()) .setDatabaseId("databaseId1688905718") .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) + .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build()) + .putAllTags(new HashMap()) .build(); client.restoreDatabaseAsync(request).get(); Assert.fail("No exception raised"); @@ -2068,4 +2705,82 @@ public void deleteBackupScheduleExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void cloneDatabaseTest() throws Exception { + Database expectedResponse = + Database.newBuilder() + .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setLocationId("locationId1541836720") + .setVersionRetentionPeriod(Duration.newBuilder().build()) + .setEarliestVersionTime(Timestamp.newBuilder().build()) + .setKeyPrefix("keyPrefix-2076395055") + .setCmekConfig(Database.CmekConfig.newBuilder().build()) + .setPreviousId("previousId-32447886") + .setSourceInfo(Database.SourceInfo.newBuilder().build()) + .putAllTags(new HashMap()) + .setFreeTier(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("cloneDatabaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFirestoreAdmin.addResponse(resultOperation); + + 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 actualResponse = client.cloneDatabaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CloneDatabaseRequest actualRequest = ((CloneDatabaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getDatabaseId(), actualRequest.getDatabaseId()); + Assert.assertEquals(request.getPitrSnapshot(), actualRequest.getPitrSnapshot()); + Assert.assertEquals(request.getEncryptionConfig(), actualRequest.getEncryptionConfig()); + Assert.assertEquals(request.getTagsMap(), actualRequest.getTagsMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cloneDatabaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + CloneDatabaseRequest request = + CloneDatabaseRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setDatabaseId("databaseId1688905718") + .setPitrSnapshot(PitrSnapshot.newBuilder().build()) + .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build()) + .putAllTags(new HashMap()) + .build(); + client.cloneDatabaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } } diff --git a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.java index 531ec17c0..577ed1029 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.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/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java index 2b3171d8f..592c5f972 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.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. @@ -20,14 +20,19 @@ import com.google.firestore.admin.v1.Backup; import com.google.firestore.admin.v1.BackupSchedule; import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.CloneDatabaseRequest; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; 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.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.ExportDocumentsRequest; import com.google.firestore.admin.v1.Field; import com.google.firestore.admin.v1.FirestoreAdminGrpc.FirestoreAdminImplBase; @@ -36,6 +41,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.ImportDocumentsRequest; import com.google.firestore.admin.v1.Index; import com.google.firestore.admin.v1.ListBackupSchedulesRequest; @@ -48,10 +54,14 @@ 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.RestoreDatabaseRequest; import com.google.firestore.admin.v1.UpdateBackupScheduleRequest; 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.AbstractMessage; import com.google.protobuf.Empty; @@ -403,6 +413,153 @@ public void deleteDatabase( } } + @Override + public void createUserCreds( + CreateUserCredsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserCreds) { + requests.add(request); + responseObserver.onNext(((UserCreds) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateUserCreds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserCreds.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getUserCreds( + GetUserCredsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserCreds) { + requests.add(request); + responseObserver.onNext(((UserCreds) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetUserCreds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserCreds.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listUserCreds( + ListUserCredsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListUserCredsResponse) { + requests.add(request); + responseObserver.onNext(((ListUserCredsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListUserCreds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListUserCredsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void enableUserCreds( + EnableUserCredsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserCreds) { + requests.add(request); + responseObserver.onNext(((UserCreds) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method EnableUserCreds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserCreds.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void disableUserCreds( + DisableUserCredsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserCreds) { + requests.add(request); + responseObserver.onNext(((UserCreds) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DisableUserCreds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserCreds.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resetUserPassword( + ResetUserPasswordRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserCreds) { + requests.add(request); + responseObserver.onNext(((UserCreds) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResetUserPassword, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserCreds.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteUserCreds( + DeleteUserCredsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteUserCreds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getBackup(GetBackupRequest request, StreamObserver responseObserver) { Object response = responses.poll(); @@ -590,4 +747,25 @@ public void deleteBackupSchedule( Exception.class.getName()))); } } + + @Override + public void cloneDatabase( + CloneDatabaseRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CloneDatabase, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockLocations.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockLocations.java index 10cecbc88..3465c6551 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockLocations.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockLocations.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/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.java index 6e12a2e8d..72512ff57 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.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/clirr-ignored-differences.xml b/google-cloud-firestore/clirr-ignored-differences.xml index 7a4c83689..d25cf435d 100644 --- a/google-cloud-firestore/clirr-ignored-differences.xml +++ b/google-cloud-firestore/clirr-ignored-differences.xml @@ -299,4 +299,26 @@ com/google/cloud/firestore/collection/StandardComparator * + + + + 7012 + com/google/cloud/firestore/Firestore + com.google.cloud.firestore.PipelineSource pipeline() + + + 7013 + com/google/cloud/firestore/Transaction + com.google.api.core.ApiFuture execute(com.google.cloud.firestore.Pipeline) + + + 7013 + com/google/cloud/firestore/Transaction + com.google.api.core.ApiFuture execute(com.google.cloud.firestore.Pipeline, com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions) + + + 7012 + com/google/cloud/firestore/spi/v1/FirestoreRpc + com.google.api.gax.rpc.ServerStreamingCallable executePipelineCallable() + diff --git a/google-cloud-firestore/pom.xml b/google-cloud-firestore/pom.xml index 2516b9165..074ff530e 100644 --- a/google-cloud-firestore/pom.xml +++ b/google-cloud-firestore/pom.xml @@ -305,6 +305,51 @@ + + maven-assembly-plugin + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + default-compile + none + + + default-testCompile + none + + + compile + compile + + compile + + + + testCompile + test-compile + + testCompile + + + + diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuery.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuery.java index 84b4a0478..c94a53b5e 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuery.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuery.java @@ -16,6 +16,7 @@ package com.google.cloud.firestore; +import static com.google.cloud.firestore.pipeline.expressions.Expr.and; import static com.google.cloud.firestore.telemetry.TraceUtil.ATTRIBUTE_KEY_ATTEMPT; import static com.google.cloud.firestore.telemetry.TraceUtil.SPAN_NAME_RUN_AGGREGATION_QUERY; @@ -27,6 +28,8 @@ import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StreamController; import com.google.cloud.Timestamp; +import com.google.cloud.firestore.pipeline.expressions.AliasedAggregate; +import com.google.cloud.firestore.pipeline.expressions.BooleanExpr; import com.google.cloud.firestore.telemetry.TraceUtil; import com.google.cloud.firestore.telemetry.TraceUtil.Scope; import com.google.cloud.firestore.v1.FirestoreSettings; @@ -47,6 +50,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.stream.Collectors; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -76,6 +80,30 @@ public Query getQuery() { return query; } + Pipeline pipeline() { + Pipeline pipeline = getQuery().pipeline(); + + List existsExprs = + this.aggregateFieldList.stream() + .map(PipelineUtils::toPipelineExistsExpr) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + if (existsExprs.size() == 1) { + pipeline = pipeline.where(existsExprs.get(0)); + } else if (existsExprs.size() > 1) { + pipeline = + pipeline.where( + and( + existsExprs.get(0), + existsExprs.subList(1, existsExprs.size()).toArray(new BooleanExpr[0]))); + } + + return pipeline.aggregate( + this.aggregateFieldList.stream() + .map(PipelineUtils::toPipelineAggregatorTarget) + .toArray(AliasedAggregate[]::new)); + } + /** * Executes this query. * diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuerySnapshot.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuerySnapshot.java index ff7b99906..be98e61d2 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuerySnapshot.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuerySnapshot.java @@ -16,6 +16,7 @@ package com.google.cloud.firestore; +import com.google.api.core.InternalApi; import com.google.api.core.InternalExtensionOnly; import com.google.cloud.Timestamp; import com.google.firestore.v1.Value; @@ -189,4 +190,9 @@ public boolean equals(Object object) { public int hashCode() { return Objects.hash(query, data); } + + @InternalApi + Map getData() { + return data; + } } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BulkWriterException.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BulkWriterException.java index 57c276838..0b9765e53 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BulkWriterException.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BulkWriterException.java @@ -41,27 +41,37 @@ public BulkWriterException( this.failedAttempts = failedAttempts; } - /** @return The status code of the error. */ + /** + * @return The status code of the error. + */ public Status getStatus() { return status; } - /** @return The error message of the error. */ + /** + * @return The error message of the error. + */ public String getMessage() { return message; } - /** @return The DocumentReference the operation was performed on. */ + /** + * @return The DocumentReference the operation was performed on. + */ public DocumentReference getDocumentReference() { return documentReference; } - /** @return The type of operation performed. */ + /** + * @return The type of operation performed. + */ public OperationType getOperationType() { return operationType; } - /** @return How many times this operation has been attempted unsuccessfully. */ + /** + * @return How many times this operation has been attempted unsuccessfully. + */ public int getFailedAttempts() { return failedAttempts; } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ExplainStats.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ExplainStats.java new file mode 100644 index 000000000..ffa184247 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ExplainStats.java @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore; + +import com.google.api.core.BetaApi; +import com.google.protobuf.Any; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.StringValue; +import javax.annotation.Nonnull; + +/** + * A wrapper object to access explain stats if explain or analyze was enabled for the Pipeline query + * execution. + */ +@BetaApi +public final class ExplainStats { + + private final Any explainStatsData; + + /** + * @hideconstructor + * @param explainStatsData The raw proto message of the explain stats. + */ + ExplainStats(@Nonnull Any explainStatsData) { + this.explainStatsData = explainStatsData; + } + + /** + * Returns the explain stats in an encoded proto format, as returned from the Firestore backend. + * The caller is responsible for unpacking this proto message. + */ + @Nonnull + public Any getRawData() { + return explainStatsData; + } + + private StringValue decode() { + try { + return explainStatsData.unpack(StringValue.class); + } catch (InvalidProtocolBufferException e) { + throw new RuntimeException( + "Unable to decode explain stats. Did you request an output format that returns a string value, such as 'text' or 'json'?", + e); + } + } + + /** + * When explain stats were requested with `outputFormat = 'text'`, this returns the explain stats + * string verbatim as returned from the Firestore backend. + * + *

If explain stats were requested with `outputFormat = 'json'`, this returns the explain stats + * as stringified JSON, which was returned from the Firestore backend. + */ + @Nonnull + public String getText() { + return decode().getValue(); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldPath.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldPath.java index e6939c445..c5b9a8173 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldPath.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldPath.java @@ -16,6 +16,7 @@ package com.google.cloud.firestore; +import com.google.api.core.InternalApi; import com.google.auto.value.AutoValue; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -79,7 +80,8 @@ static boolean isDocumentId(String path) { } /** Returns a field path from a dot separated string. Does not support escaping. */ - static FieldPath fromDotSeparatedString(String field) { + @InternalApi + public static FieldPath fromDotSeparatedString(String field) { if (PROHIBITED_CHARACTERS.matcher(field).matches()) { throw new IllegalArgumentException("Use FieldPath.of() for field names containing '˜*/[]'."); } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Firestore.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Firestore.java index 5bbb1164a..7f5bc54b5 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Firestore.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Firestore.java @@ -66,6 +66,8 @@ public interface Firestore extends Service, AutoCloseable { */ CollectionGroup collectionGroup(@Nonnull String collectionId); + PipelineSource pipeline(); + /** * Executes the given updateFunction and then attempts to commit the changes applied within the * transaction. If any document read within the transaction has changed, the updateFunction will diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreBundle.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreBundle.java index 07cdedfdf..35a2ef96e 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreBundle.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreBundle.java @@ -112,10 +112,7 @@ private Builder add(DocumentSnapshot documentSnapshot, Optional queryNam documents .get(documentName) .setMetadata( - documents - .get(documentName) - .getMetadata() - .toBuilder() + documents.get(documentName).getMetadata().toBuilder() .clearQueries() .addAllQueries(queries) .build()); diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreImpl.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreImpl.java index 48c691466..bdfaca50e 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreImpl.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreImpl.java @@ -20,6 +20,7 @@ import com.google.api.core.ApiClock; import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; import com.google.api.core.NanoClock; import com.google.api.core.SettableApiFuture; import com.google.api.gax.rpc.ApiStreamObserver; @@ -399,6 +400,13 @@ public CollectionGroup collectionGroup(@Nonnull final String collectionId) { return new CollectionGroup(this, collectionId); } + @Nonnull + @Override + @BetaApi + public PipelineSource pipeline() { + return new PipelineSource(this); + } + @Nonnull @Override public ApiFuture runTransaction(@Nonnull final Transaction.Function updateFunction) { diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Pipeline.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Pipeline.java new file mode 100644 index 000000000..5dd3c9c02 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Pipeline.java @@ -0,0 +1,1267 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore; + +import static com.google.cloud.firestore.pipeline.expressions.Expr.field; + +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.core.InternalExtensionOnly; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.rpc.ApiStreamObserver; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.StreamController; +import com.google.cloud.Timestamp; +import com.google.cloud.firestore.pipeline.expressions.AliasedAggregate; +import com.google.cloud.firestore.pipeline.expressions.AliasedExpr; +import com.google.cloud.firestore.pipeline.expressions.BooleanExpr; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.cloud.firestore.pipeline.expressions.Field; +import com.google.cloud.firestore.pipeline.expressions.Ordering; +import com.google.cloud.firestore.pipeline.expressions.Selectable; +import com.google.cloud.firestore.pipeline.stages.AddFields; +import com.google.cloud.firestore.pipeline.stages.Aggregate; +import com.google.cloud.firestore.pipeline.stages.Distinct; +import com.google.cloud.firestore.pipeline.stages.FindNearest; +import com.google.cloud.firestore.pipeline.stages.FindNearestOptions; +import com.google.cloud.firestore.pipeline.stages.GenericOptions; +import com.google.cloud.firestore.pipeline.stages.GenericStage; +import com.google.cloud.firestore.pipeline.stages.Limit; +import com.google.cloud.firestore.pipeline.stages.Offset; +import com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions; +import com.google.cloud.firestore.pipeline.stages.RemoveFields; +import com.google.cloud.firestore.pipeline.stages.ReplaceWith; +import com.google.cloud.firestore.pipeline.stages.Sample; +import com.google.cloud.firestore.pipeline.stages.Select; +import com.google.cloud.firestore.pipeline.stages.Sort; +import com.google.cloud.firestore.pipeline.stages.Stage; +import com.google.cloud.firestore.pipeline.stages.StageUtils; +import com.google.cloud.firestore.pipeline.stages.Union; +import com.google.cloud.firestore.pipeline.stages.Unnest; +import com.google.cloud.firestore.pipeline.stages.UnnestOptions; +import com.google.cloud.firestore.pipeline.stages.Where; +import com.google.common.collect.FluentIterable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.firestore.v1.Document; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; +import com.google.firestore.v1.StructuredPipeline; +import com.google.firestore.v1.Value; +import com.google.protobuf.ByteString; +import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.Tracing; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * The Pipeline class provides a flexible and expressive framework for building complex data + * transformation and query pipelines for Firestore. + * + *

A pipeline takes data sources, such as Firestore collections or collection groups, and applies + * a series of stages that are chained together. Each stage takes the output from the previous stage + * (or the data source) and produces an output for the next stage (or as the final output of the + * pipeline). + * + *

Expressions from {@link com.google.cloud.firestore.pipeline.expressions} can be used within + * each stages to filter and transform data through the stage. + * + *

NOTE: The chained stages do not prescribe exactly how Firestore will execute the pipeline. + * Instead, Firestore only guarantees that the result is the same as if the chained stages were + * executed in order. + * + *

Usage Examples: + * + *

{@code
+ * Firestore firestore; // A valid firestore instance.
+ *
+ * // Example 1: Select specific fields and rename 'rating' to 'bookRating'
+ * List results1 = firestore.pipeline()
+ *     .collection("books")
+ *     .select("title", "author", field("rating").as("bookRating"))
+ *     .execute()
+ *     .get();
+ *
+ * // Example 2: Filter documents where 'genre' is "Science Fiction" and 'published' is after 1950
+ * List results2 = firestore.pipeline()
+ *     .collection("books")
+ *     .where(and(eq("genre", "Science Fiction"), gt("published", 1950)))
+ *     .execute()
+ *     .get();
+ * // Same as above but using methods on expressions as opposed to static functions.
+ * results2 = firestore.pipeline()
+ *     .collection("books")
+ *     .where(and(field("genre").eq("Science Fiction"), field("published").gt(1950)))
+ *     .execute()
+ *     .get();
+ *
+ * // Example 3: Calculate the average rating of books published after 1980
+ * List results3 = firestore.pipeline()
+ *     .collection("books")
+ *     .where(gt("published", 1980))
+ *     .aggregate(avg("rating").as("averageRating"))
+ *     .execute()
+ *     .get();
+ * }
+ */ +@BetaApi +public final class Pipeline { + private static Logger logger = Logger.getLogger(Pipeline.class.getName()); + private final FluentIterable stages; + private final FirestoreRpcContext rpcContext; + + private Pipeline(FirestoreRpcContext rpcContext, FluentIterable stages) { + this.rpcContext = rpcContext; + this.stages = stages; + } + + @InternalApi + Pipeline(FirestoreRpcContext rpcContext, Stage stage) { + this(rpcContext, FluentIterable.of(stage)); + } + + private Pipeline append(Stage stage) { + return new Pipeline(this.rpcContext, stages.append(stage)); + } + + /** + * Adds new fields to outputs from previous stages. + * + *

This stage allows you to compute values on-the-fly based on existing data from previous + * stages or constants. You can use this to create new fields or overwrite existing ones (if there + * is name overlaps). + * + *

The added fields are defined using {@link Selectable} expressions, which can be: + * + *

    + *
  • {@link Field}: References an existing document field. + *
  • {@link Function}: Performs a calculation using functions like `add`, `multiply` with + * assigned aliases using {@link + * com.google.cloud.firestore.pipeline.expressions.Expr#as(String)}. + *
+ * + *

Example: + * + *

{@code
+   * firestore.pipeline().collection("books")
+   *   .addFields(
+   *     field("rating").as("bookRating"), // Rename 'rating' to 'bookRating'
+   *     add(5, field("quantity")).as("totalCost")  // Calculate 'totalCost'
+   *   );
+   * }
+ * + * @param fields The fields to add to the documents, specified as {@link Selectable} expressions. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline addFields(Selectable... fields) { + return append(new AddFields(PipelineUtils.selectablesToMap(fields))); + } + + /** + * Remove fields from outputs of previous stages. + * + *

Example: + * + *

{@code
+   * firestore.pipeline().collection("books")
+   *   .removeFields(
+   *     "rating", "cost"
+   *   );
+   * }
+ * + * @param fields The fields to remove. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline removeFields(String... fields) { + return append( + new RemoveFields( + ImmutableList.builder() + .addAll(Arrays.stream(fields).map(f -> Field.ofUserPath(f)).iterator()) + .build())); + } + + /** + * Remove fields from outputs of previous stages. + * + *

Example: + * + *

{@code
+   * firestore.pipeline().collection("books")
+   *   .removeFields(
+   *     field("rating"), field("cost")
+   *   );
+   * }
+ * + * @param fields The fields to remove. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline removeFields(Field... fields) { + return append( + new RemoveFields( + ImmutableList.builder().addAll(Arrays.stream(fields).iterator()).build())); + } + + /** + * Selects or creates a set of fields from the outputs of previous stages. + * + *

The selected fields are defined using {@link Selectable} expressions, which can be: + * + *

    + *
  • {@link Field}: References an existing document field. + *
  • {@link Function}: Represents the result of a function with an assigned alias name using + * {@link com.google.cloud.firestore.pipeline.expressions.Expr#as(String)} + *
+ * + *

If no selections are provided, the output of this stage is empty. Use {@link + * com.google.cloud.firestore.Pipeline#addFields(Selectable...)} instead if only additions are + * desired. + * + *

Example: + * + *

{@code
+   * firestore.pipeline().collection("books")
+   *   .select(
+   *     field("name"),
+   *     field("address").toUppercase().as("upperAddress"),
+   *   );
+   * }
+ * + * @param selections The fields to include in the output documents, specified as {@link + * Selectable} expressions. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline select(Selectable... selections) { + return append(new Select(PipelineUtils.selectablesToMap(selections))); + } + + /** + * Selects a set of fields from the outputs of previous stages. + * + *

If no selections are provided, the output of this stage is empty. Use {@link + * com.google.cloud.firestore.Pipeline#addFields(Selectable...)} instead if only additions are + * desired. + * + *

Example: + * + *

{@code
+   * firestore.collection("books")
+   *   .select("name", "address");
+   *
+   * // The above is a shorthand of this:
+   * firestore.pipeline().collection("books")
+   *    .select(field("name"), field("address"));
+   * }
+ * + * @param fields The name of the fields to include in the output documents. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline select(String... fields) { + return append(new Select(PipelineUtils.fieldNamesToMap(fields))); + } + + /** + * Filters the documents from previous stages to only include those matching the specified {@link + * FilterCondition}. + * + *

This stage allows you to apply conditions to the data, similar to a "WHERE" clause in SQL. + * You can filter documents based on their field values, using implementions of {@link + * FilterCondition}, typically including but not limited to: + * + *

    + *
  • field comparators: {@link Function#eq}, {@link Function#lt} (less than), {@link + * Function#gt} (greater than), etc. + *
  • logical operators: {@link Function#and}, {@link Function#or}, {@link Function#not}, etc. + *
  • advanced functions: {@link Function#regexMatch(String, String)}, {@link + * Function#arrayContains(Expr, Expr)}, etc. + *
+ * + *

Example: + * + *

{@code
+   * firestore.pipeline().collection("books")
+   *   .where(
+   *     and(
+   *         gt("rating", 4.0),   // Filter for ratings greater than 4.0
+   *         field("genre").eq("Science Fiction") // Equivalent to gt("genre", "Science Fiction")
+   *     )
+   *   );
+   * }
+ * + * @param condition The {@link FilterCondition} to apply. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline where(BooleanExpr condition) { + return append(new Where(condition)); + } + + /** + * Skips the first `offset` number of documents from the results of previous stages. + * + *

This stage is useful for implementing pagination in your pipelines, allowing you to retrieve + * results in chunks. It is typically used in conjunction with {@link #limit(int)} to control the + * size of each page. + * + *

Example: + * + *

{@code
+   * // Retrieve the second page of 20 results
+   * firestore.pipeline().collection("books")
+   *     .sort(field("published").descending())
+   *     .offset(20)  // Skip the first 20 results
+   *     .limit(20);   // Take the next 20 results
+   * }
+ * + * @param offset The number of documents to skip. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline offset(int offset) { + return append(new Offset(offset)); + } + + /** + * Limits the maximum number of documents returned by previous stages to `limit`. + * + *

This stage is particularly useful when you want to retrieve a controlled subset of data from + * a potentially large result set. It's often used for: + * + *

    + *
  • **Pagination:** In combination with {@link #offset(int)} to retrieve specific pages of + * results. + *
  • **Limiting Data Retrieval:** To prevent excessive data transfer and improve performance, + * especially when dealing with large collections. + *
+ * + *

Example: + * + *

{@code
+   * // Limit the results to the top 10 highest-rated books
+   * firestore.pipeline().collection("books")
+   *     .sort(field("rating").descending())
+   *     .limit(10);
+   * }
+ * + * @param limit The maximum number of documents to return. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline limit(int limit) { + return append(new Limit(limit)); + } + + /** + * Performs aggregation operations on the documents from previous stages. + * + *

This stage allows you to calculate aggregate values over a set of documents. You define the + * aggregations to perform using {@link AliasedExpr} expressions which are typically results of + * calling {@link Expr#as(String)} on {@link Accumulator} instances. + * + *

Example: + * + *

{@code
+   * // Calculate the average rating and the total number of books
+   * firestore.pipeline().collection("books")
+   *     .aggregate(
+   *         field("rating").avg().as("averageRating"),
+   *         countAll().as("totalBooks")
+   *     );
+   * }
+ * + * @param accumulators The {@link AliasedExpr} expressions, each wrapping an {@link Accumulator} + * and provide a name for the accumulated results. + * @return A new Pipeline object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline aggregate(AliasedAggregate... accumulators) { + return append(Aggregate.withAccumulators(accumulators)); + } + + /** + * Performs optionally grouped aggregation operations on the documents from previous stages. + * + *

This stage allows you to calculate aggregate values over a set of documents, optionally + * grouped by one or more fields or functions. You can specify: + * + *

    + *
  • **Grouping Fields or Functions:** One or more fields or functions to group the documents + * by. For each distinct combination of values in these fields, a separate group is created. + * If no grouping fields are provided, a single group containing all documents is used. Not + * specifying groups is the same as putting the entire inputs into one group. + *
  • **Accumulators:** One or more accumulation operations to perform within each group. These + * are defined using {@link AliasedExpr} expressions, which are typically created by calling + * {@link Expr#as(String)} on {@link Accumulator} instances. Each aggregation calculates a + * value (e.g., sum, average, count) based on the documents within its group. + *
+ * + *

Example: + * + *

{@code
+   * // Calculate the average rating for each genre.
+   * firestore.pipeline().collection("books")
+   *   .aggregate(
+   *     Aggregate
+   *       .withAccumulators(avg("rating").as("avg_rating"))
+   *       .withGroups("genre"));
+   * }
+ * + * @param aggregate An {@link Aggregate} object that specifies the grouping fields (if any) and + * the aggregation operations to perform. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline aggregate(Aggregate aggregate) { + return append(aggregate); + } + + /** + * Returns a set of distinct field values from the inputs to this stage. + * + *

This stage run through the results from previous stages to include only results with unique + * combinations of values for the specified fields and produce these fields as the output. + * + *

Example: + * + *

{@code
+   * // Get a list of unique genres.
+   * firestore.pipeline().collection("books")
+   *     .distinct("genre");
+   * }
+ * + * @param fields The fields to consider when determining distinct values. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline distinct(String... fields) { + return append(new Distinct(PipelineUtils.fieldNamesToMap(fields))); + } + + /** + * Returns a set of distinct {@link Expr} values from the inputs to this stage. + * + *

This stage run through the results from previous stages to include only results with unique + * combinations of {@link Expr} values ({@link Field}, {@link Function}, etc). + * + *

The parameters to this stage are defined using {@link Selectable} expressions, which can be: + * + *

    + *
  • {@link Field}: References an existing document field. + *
  • {@link Function}: Represents the result of a function with an assigned alias name using + * {@link com.google.cloud.firestore.pipeline.expressions.Expr#as(String)} + *
+ * + *

Example: + * + *

{@code
+   * // Get a list of unique author names in uppercase and genre combinations.
+   * firestore.pipeline().collection("books")
+   *     .distinct(toUppercase(field("author")).as("authorName"), field("genre"))
+   *     .select("authorName");
+   * }
+ * + * @param selectables The {@link Selectable} expressions to consider when determining distinct + * value combinations. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline distinct(Selectable... selectables) { + return append(new Distinct(PipelineUtils.selectablesToMap(selectables))); + } + + /** + * Performs vector distance (similarity) search with given parameters to the stage inputs. + * + *

This stage adds a "nearest neighbor search" capability to your pipelines. Given a field that + * stores vectors and a target vector, this stage will identify and return the inputs whose vector + * field is closest to the target vector, using the parameters specified in `options`. + * + *

Example: + * + *

{@code
+   * // Find books with similar "topicVectors" to the given targetVector
+   * firestore.pipeline().collection("books")
+   *     .findNearest("topicVectors", targetVector, FindNearest.DistanceMeasure.COSINE,
+   *        new FindNearestOptions()
+   *          .withLimit(10)
+   *          .withDistanceField("distance"));
+   * }
+ * + * @param fieldName The name of the field containing the vector data. This field should store + * {@link VectorValue}. + * @param vector The target vector to compare against. + * @param distanceMeasure The distance measure to use: cosine, euclidean, etc. + * @param options Configuration options for the nearest neighbor search, such as limit and output + * distance field name. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline findNearest( + String fieldName, + double[] vector, + FindNearest.DistanceMeasure distanceMeasure, + FindNearestOptions options) { + return findNearest(field(fieldName), vector, distanceMeasure, options); + } + + /** + * Performs vector distance (similarity) search with given parameters to the stage inputs. + * + *

This stage adds a "nearest neighbor search" capability to your pipelines. Given an + * expression that evaluates to a vector and a target vector, this stage will identify and return + * the inputs whose vector expression is closest to the target vector, using the parameters + * specified in `options`. + * + *

Example: + * + *

{@code
+   * // Find books with similar "topicVectors" to the given targetVector
+   * firestore.pipeline().collection("books")
+   *     .findNearest(
+   *        FindNearest.of(field("topicVectors"), targetVector, FindNearest.DistanceMeasure.COSINE),
+   *        new FindNearestOptions()
+   *          .withLimit(10)
+   *          .withDistanceField("distance"));
+   * }
+ * + * @param property The expression that evaluates to a vector value using the stage inputs. + * @param vector The target vector to compare against. + * @param distanceMeasure The distance measure to use: cosine, euclidean, etc. + * @param options Configuration options for the nearest neighbor search, such as limit and output + * distance field name. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline findNearest( + Expr property, + double[] vector, + FindNearest.DistanceMeasure distanceMeasure, + FindNearestOptions options) { + // Implementation for findNearest (add the FindNearest stage if needed) + return append(new FindNearest(property, new VectorValue(vector), distanceMeasure, options)); + } + + /** + * Sorts the documents from previous stages based on one or more {@link Ordering} criteria. + * + *

This stage allows you to order the results of your pipeline. You can specify multiple {@link + * Ordering} instances to sort by multiple fields in ascending or descending order. If documents + * have the same value for a field used for sorting, the next specified ordering will be used. If + * all orderings result in equal comparison, the documents are considered equal and the order is + * unspecified. + * + *

Example: + * + *

{@code
+   * // Sort books by rating in descending order, and then by title in ascending order for books with the same rating
+   * firestore.pipeline().collection("books")
+   *     .sort(
+   *         Ordering.of("rating").descending(),
+   *         Ordering.of("title")  // Ascending order is the default
+   *     );
+   * }
+ * + * @param orders One or more {@link Ordering} instances specifying the sorting criteria. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline sort(Ordering... orders) { + return append(new Sort(ImmutableList.copyOf(orders))); + } + + /** + * Fully overwrites all fields in a document with those coming from a nested map. + * + *

This stage allows you to emit a map value as a document. Each key of the map becomes a field + * on the document that contains the corresponding value. + * + *

Example: + * + *

{@code
+   * // Input.
+   * // {
+   * //  "name": "John Doe Jr.",
+   * //  "parents": {
+   * //    "father": "John Doe Sr.",
+   * //    "mother": "Jane Doe"
+   * // }
+   *
+   * // Emit parents as document.
+   * firestore.pipeline().collection("people").replace("parents");
+   *
+   * // Output
+   * // {
+   * //  "father": "John Doe Sr.",
+   * //  "mother": "Jane Doe"
+   * // }
+   * }
+ * + * @param fieldName The name of the field containing the nested map. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline replaceWith(String fieldName) { + return replaceWith(field(fieldName)); + } + + /** + * Fully overwrites all fields in a document with those coming from a nested map. + * + *

This stage allows you to emit a map value as a document. Each key of the map becomes a field + * on the document that contains the corresponding value. + * + *

Example: + * + *

{@code
+   * // Input.
+   * // {
+   * //  "name": "John Doe Jr.",
+   * //  "parents": {
+   * //    "father": "John Doe Sr.",
+   * //    "mother": "Jane Doe"
+   * // }
+   *
+   * // Emit parents as document.
+   * firestore.pipeline().collection("people").replace(field("parents"));
+   *
+   * // Output
+   * // {
+   * //  "father": "John Doe Sr.",
+   * //  "mother": "Jane Doe"
+   * // }
+   * }
+ * + * @param field The {@link Selectable} field containing the nested map. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline replaceWith(Expr expr) { + return append(new ReplaceWith(expr)); + } + + /** + * Performs a pseudo-random sampling of the documents from the previous stage. + * + *

This stage will filter documents pseudo-randomly. The 'limit' parameter specifies the number + * of documents to emit from this stage, but if there are fewer documents from previous stage than + * the 'limit' parameter, then no filtering will occur and all documents will pass through. + * + *

Example: + * + *

{@code
+   * // Sample 10 books, if available.
+   * firestore.pipeline().collection("books")
+   *     .sample(10);
+   * }
+ * + * @param limit The number of documents to emit, if possible. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline sample(int limit) { + return sample(Sample.withDocLimit(limit)); + } + + /** + * Performs a pseudo-random sampling of the documents from the previous stage. + * + *

This stage will filter documents pseudo-randomly. The 'options' parameter specifies how + * sampling will be performed. See {@code SampleOptions} for more information. + * + *

Examples: + * + *

{@code
+   * // Sample 10 books, if available.
+   * firestore.pipeline().collection("books")
+   *     .sample(Sample.withDocLimit(10));
+   *
+   * // Sample 50% of books.
+   * firestore.pipeline().collection("books")
+   *     .sample(Sample.withPercentage(0.5));
+   * }
+ * + * @param sample The {@code Sample} specifies how sampling is performed. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline sample(Sample sample) { + return append(sample); + } + + /** + * Performs union of all documents from two pipelines, including duplicates. + * + *

This stage will pass through documents from previous stage, and also pass through documents + * from previous stage of the `other` {@code Pipeline} given in parameter. The order of documents + * emitted from this stage is undefined. + * + *

Example: + * + *

{@code
+   * // Emit documents from books collection and magazines collection.
+   * firestore.pipeline().collection("books")
+   *     .union(firestore.pipeline().collection("magazines"));
+   * }
+ * + * @param other The other {@code Pipeline} that is part of union. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline union(Pipeline other) { + return append(new Union(other)); + } + + /** + * Produces a document for each element in array found in previous stage document. + * + *

For each previous stage document, this stage will emit zero or more augmented documents. The + * input array found in the previous stage document field specified by the `fieldName` parameter, + * will for each input array element produce an augmented document. The input array element will + * augment the previous stage document by replacing the field specified by `fieldName` parameter + * with the element value. + * + *

In other words, the field containing the input array will be removed from the augmented + * document and replaced by the corresponding array element. + * + *

Example: + * + *

{@code
+   * // Input:
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tags": [ "comedy", "space", "adventure" ], ... }
+   *
+   * // Emit a book document for each tag of the book.
+   * firestore.pipeline().collection("books")
+   *     .unnest("tags", "tag");
+   *
+   * // Output:
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tag": "comedy", ... }
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tag": "space", ... }
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tag": "adventure", ... }
+   * }
+ * + * @param fieldName The name of the field containing the array. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline unnest(String fieldName, String alias) { + // return unnest(field(fieldName)); + return append(new Unnest(field(fieldName), alias)); + } + + // /** + // * Produces a document for each element in array found in previous stage document. + // * + // *

For each previous stage document, this stage will emit zero or more augmented documents. + // * The input array found in the specified by {@code Selectable} expression parameter, will for + // * each input array element produce an augmented document. The input array element will augment + // * the previous stage document by assigning the {@code Selectable} alias the element value. + // * + // *

Example: + // * + // *

{@code
+  //  * // Input:
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tags": [ "comedy", "space",
+  // "adventure" ], ... }
+  //  *
+  //  * // Emit a book document for each tag of the book.
+  //  * firestore.pipeline().collection("books")
+  //  *     .unnest(field("tags").as("tag"));
+  //  *
+  //  * // Output:
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tag": "comedy", "tags": [ "comedy",
+  // "space", "adventure" ], ... }
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tag": "space", "tags": [ "comedy",
+  // "space", "adventure" ], ... }
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tag": "adventure", "tags": [
+  // "comedy", "space", "adventure" ], ... }
+  //  * }
+ // * + // * @param field The expression that evaluates to the input array. + // * @return A new {@code Pipeline} object with this stage appended to the stage list. + // */ + // @BetaApi + // public Pipeline unnest(Selectable field) { + // return append(new Unnest(field)); + // } + + /** + * Produces a document for each element in array found in previous stage document. + * + *

For each previous stage document, this stage will emit zero or more augmented documents. The + * input array found in the previous stage document field specified by the `fieldName` parameter, + * will for each input array element produce an augmented document. The input array element will + * augment the previous stage document by replacing the field specified by `fieldName` parameter + * with the element value. + * + *

In other words, the field containing the input array will be removed from the augmented + * document and replaced by the corresponding array element. + * + *

Example: + * + *

{@code
+   * // Input:
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tags": [ "comedy", "space", "adventure" ], ... }
+   *
+   * // Emit a book document for each tag of the book.
+   * firestore.pipeline().collection("books")
+   *     .unnest("tags", "tag", new UnnestOptions().withIndexField("tagIndex"));
+   *
+   * // Output:
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 0, "tag": "comedy", ... }
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 1, "tag": "space", ... }
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 2, "tag": "adventure", ... }
+   * }
+ * + * @param fieldName The name of the field containing the array. + * @param options The {@code UnnestOptions} options. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline unnest(String fieldName, String alias, UnnestOptions options) { + return append(new Unnest(field(fieldName), alias, options)); + } + + /** + * Produces a document for each element in array found in previous stage document. + * + *

For each previous stage document, this stage will emit zero or more augmented documents. The + * input array found in the previous stage document field specified by the `fieldName` parameter, + * will for each input array element produce an augmented document. The input array element will + * augment the previous stage document by replacing the field specified by `fieldName` parameter + * with the element value. + * + *

In other words, the field containing the input array will be removed from the augmented + * document and replaced by the corresponding array element. + * + *

Example: + * + *

{@code
+   * // Input:
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tags": [ "comedy", "space", "adventure" ], ... }
+   *
+   * // Emit a book document for each tag of the book.
+   * firestore.pipeline().collection("books")
+   *     .unnest(field("tags").as("tag"));
+   *
+   * // Output:
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 0, "tag": "comedy", ... }
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 1, "tag": "space", ... }
+   * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 2, "tag": "adventure", ... }
+   * }
+ * + * @param expr The name of the expression containing the array. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline unnest(Selectable expr) { + return append(new Unnest(expr)); + } + + // /** + // * Produces a document for each element in array found in previous stage document. + // * + // *

For each previous stage document, this stage will emit zero or more augmented documents. + // * The input array found in the specified by {@code Selectable} expression parameter, will for + // * each input array element produce an augmented document. The input array element will augment + // * the previous stage document by assigning the {@code Selectable} alias the element value. + // * + // *

Example: + // * + // *

{@code
+  //  * // Input:
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tags": [ "comedy", "space",
+  // "adventure" ], ... }
+  //  *
+  //  * // Emit a book document for each tag of the book.
+  //  * firestore.pipeline().collection("books")
+  //  *     .unnest(field("tags").as("tag"), UnnestOptions.indexField("tagIndex"));
+  //  *
+  //  * // Output:
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 0, "tag": "comedy",
+  // "tags": [ "comedy", "space", "adventure" ], ... }
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 1, "tag": "space", "tags":
+  // [ "comedy", "space", "adventure" ], ... }
+  //  * // { "title": "The Hitchhiker's Guide to the Galaxy", "tagIndex": 2, "tag": "adventure",
+  // "tags": [ "comedy", "space", "adventure" ], ... }
+  //  * }
+ // * + // * @param field The expression that evaluates to the input array. + // * @param options The {@code UnnestOptions} options. + // * @return A new {@code Pipeline} object with this stage appended to the stage list. + // */ + // @BetaApi + // public Pipeline unnest(Selectable field, UnnestOptions options) { + // return append(new Unnest(field, options)); + // } + + /** + * Adds a generic stage to the pipeline. + * + *

This method provides a flexible way to extend the pipeline's functionality by adding custom + * stages. Each generic stage is defined by a unique `name` and a set of `params` that control its + * behavior. + * + *

Example (Assuming there is no "where" stage available in SDK): + * + *

{@code
+   * // Assume we don't have a built-in "where" stage
+   * Map whereParams = new HashMap<>();
+   * whereParams.put("condition", field("published").lt(1900));
+   *
+   * firestore.pipeline().collection("books")
+   *     .genericStage("where", Lists.newArrayList(field("published").lt(1900))) // Custom "where" stage
+   *     .select("title", "author");
+   * }
+ * + * @param name The unique name of the generic stage to add. + * @param params A map of parameters to configure the generic stage's behavior. + * @param optionalParams Named optional parameters to configure the generic stage's behavior. + * @return A new {@code Pipeline} object with this stage appended to the stage list. + */ + @BetaApi + public Pipeline genericStage(String name, List params, GenericOptions optionalParams) { + // Implementation for genericStage (add the GenericStage if needed) + return append( + new GenericStage( + name, params, optionalParams)); // Assuming GenericStage takes a list of params + } + + /** + * Executes this pipeline and returns a future to represent the asynchronous operation. + * + *

The returned {@link ApiFuture} can be used to track the progress of the pipeline execution + * and retrieve the results (or handle any errors) asynchronously. + * + *

The pipeline results are returned as a list of {@link PipelineResult} objects. Each {@link + * PipelineResult} typically represents a single key/value map that has passed through all the + * stages of the pipeline, however this might differ depends on the stages involved in the + * pipeline. For example: + * + *

    + *
  • If there are no stages or only transformation stages, each {@link PipelineResult} + * represents a single document. + *
  • If there is an aggregation, only a single {@link PipelineResult} is returned, + * representing the aggregated results over the entire dataset . + *
  • If there is an aggregation stage with grouping, each {@link PipelineResult} represents a + * distinct group and its associated aggregated values. + *
+ * + *

Example: + * + *

{@code
+   * ApiFuture> futureResults = firestore.pipeline().collection("books")
+   *     .where(gt("rating", 4.5))
+   *     .select("title", "author", "rating")
+   *     .execute();
+   * }
+ * + * @return An {@link ApiFuture} representing the asynchronous pipeline execution. + */ + @BetaApi + public ApiFuture execute() { + return execute(new PipelineExecuteOptions(), null, null); + } + + @BetaApi + public ApiFuture execute(PipelineExecuteOptions options) { + return execute(options, null, null); + } + + /** + * Executes this pipeline, providing results to the given {@link ApiStreamObserver} as they become + * available. + * + *

This method allows you to process pipeline results in a streaming fashion, rather than + * waiting for the entire pipeline execution to complete. The provided {@link ApiStreamObserver} + * will receive: + * + *

    + *
  • **onNext(PipelineResult):** Called for each {@link PipelineResult} produced by the + * pipeline. Each {@link PipelineResult} typically represents a single key/value map that + * has passed through all the stages. However, the exact structure might differ based on the + * stages involved in the pipeline (as described in {@link #execute()}). + *
  • **onError(Throwable):** Called if an error occurs during pipeline execution. + *
  • **onCompleted():** Called when the pipeline has finished processing all documents. + *
+ * + *

Example: + * + *

{@code
+   * firestore.pipeline().collection("books")
+   *     .where(gt("rating", 4.5))
+   *     .select("title", "author", "rating")
+   *     .execute(new ApiStreamObserver() {
+   *         @Override
+   *         public void onNext(PipelineResult result) {
+   *             // Process each result as it arrives
+   *             System.out.println(result.getData());
+   *         }
+   *
+   *         @Override
+   *         public void onError(Throwable t) {
+   *             // Handle errors during execution
+   *             t.printStackTrace();
+   *         }
+   *
+   *         @Override
+   *         public void onCompleted() {
+   *             System.out.println("Pipeline execution completed.");
+   *         }
+   *     });
+   * }
+ * + * @param observer The {@link ApiStreamObserver} to receive pipeline results and events. + */ + @BetaApi + public void execute(ApiStreamObserver observer) { + executeInternal( + new PipelineExecuteOptions(), + null, + null, + new PipelineResultObserver() { + @Override + public void onNext(PipelineResult result) { + observer.onNext(result); + } + + @Override + public void onError(Throwable t) { + observer.onError(t); + } + + @Override + public void onCompleted() { + observer.onCompleted(); + } + }); + } + + ApiFuture execute( + @Nonnull PipelineExecuteOptions options, + @Nullable final ByteString transactionId, + @Nullable com.google.protobuf.Timestamp readTime) { + SettableApiFuture futureResult = SettableApiFuture.create(); + + executeInternal( + options, + transactionId, + readTime, + new PipelineResultObserver() { + final List results = new ArrayList<>(); + + @Override + public void onCompleted() { + futureResult.set( + new PipelineSnapshot( + Pipeline.this, results, getExecutionTime(), getExplainStats())); + } + + @Override + public void onNext(PipelineResult result) { + results.add(result); + } + + @Override + public void onError(Throwable t) { + futureResult.setException(t); + } + }); + + return futureResult; + } + + void executeInternal( + @Nonnull PipelineExecuteOptions options, + @Nullable final ByteString transactionId, + @Nullable com.google.protobuf.Timestamp readTime, + PipelineResultObserver observer) { + ExecutePipelineRequest.Builder request = + ExecutePipelineRequest.newBuilder() + .setDatabase(rpcContext.getDatabaseName()) + .setStructuredPipeline( + StructuredPipeline.newBuilder() + .setPipeline(toProto()) + .putAllOptions(StageUtils.toMap(options)) + .build()); + + if (transactionId != null) { + request.setTransaction(transactionId); + } + + if (readTime != null) { + request.setReadTime(readTime); + } + + pipelineInternalStream( + request.build(), + new PipelineResultObserver() { + @Override + public void onCompleted() { + observer.setExplainStats(getExplainStats()); + observer.setExecutionTime(getExecutionTime()); + observer.onCompleted(); + } + + @Override + public void onNext(PipelineResult result) { + observer.onNext(result); + } + + @Override + public void onError(Throwable t) { + observer.onError(t); + } + }); + } + + @InternalApi + private com.google.firestore.v1.Pipeline toProto() { + return com.google.firestore.v1.Pipeline.newBuilder() + .addAllStages(stages.transform(StageUtils::toStageProto)) + .build(); + } + + @InternalApi + public com.google.firestore.v1.Value toProtoValue() { + return Value.newBuilder().setPipelineValue(toProto()).build(); + } + + private void pipelineInternalStream( + ExecutePipelineRequest request, PipelineResultObserver resultObserver) { + ResponseObserver observer = + new ResponseObserver() { + Timestamp executionTime = null; + boolean firstResponse = false; + int numDocuments = 0; + int docCounterPerTraceUpdate = 0; + boolean hasCompleted = false; + + @Override + public void onStart(StreamController controller) { + // No action needed in onStart + } + + @Override + public void onResponse(ExecutePipelineResponse response) { + if (response.hasExplainStats()) { + resultObserver.setExplainStats( + new ExplainStats(response.getExplainStats().getData())); + } + + if (response.hasExecutionTime()) { + executionTime = Timestamp.fromProto(response.getExecutionTime()); + } + + if (!firstResponse) { + firstResponse = true; + Tracing.getTracer() + .getCurrentSpan() + .addAnnotation( + "Firestore.Query: First response"); // Assuming Tracing class exists + } + if (response.getResultsCount() > 0) { + numDocuments += response.getResultsCount(); + docCounterPerTraceUpdate += response.getResultsCount(); + if (numDocuments > 100) { + Tracing.getTracer() + .getCurrentSpan() + .addAnnotation("Firestore.Pipeline: Received " + numDocuments + " results"); + docCounterPerTraceUpdate = 0; + } + + for (Document doc : response.getResultsList()) { + resultObserver.onNext(PipelineResult.fromDocument(rpcContext, executionTime, doc)); + } + } + } + + @Override + public void onError(Throwable throwable) { + Tracing.getTracer().getCurrentSpan().addAnnotation("Firestore.Query: Error"); + resultObserver.onError(throwable); + } + + @Override + public void onComplete() { + if (hasCompleted) { + return; + } + hasCompleted = true; + + Tracing.getTracer() + .getCurrentSpan() + .addAnnotation( + "Firestore.ExecutePipeline: Completed", + ImmutableMap.of( + "numDocuments", AttributeValue.longAttributeValue(numDocuments))); + resultObserver.onCompleted(executionTime); + } + }; + + logger.log(Level.INFO, "Sending pipeline request: " + request.getStructuredPipeline()); + + rpcContext.streamRequest(request, observer, rpcContext.getClient().executePipelineCallable()); + } + + private interface ResultObserver extends ApiStreamObserver { + void onCompleted(Timestamp executionTime); + + void setExplainStats(ExplainStats explainStats); + + void setExecutionTime(Timestamp executionTime); + } + + @InternalExtensionOnly + abstract static class PipelineResultObserver implements ResultObserver { + private Timestamp executionTime; + private ExplainStats explainStats; + + @Override + public void onCompleted(Timestamp executionTime) { + this.executionTime = executionTime; + this.onCompleted(); + } + + public Timestamp getExecutionTime() { + return executionTime; + } + + public ExplainStats getExplainStats() { + return explainStats; + } + + @Override + public void setExplainStats(ExplainStats explainStats) { + this.explainStats = explainStats; + } + + @Override + public void setExecutionTime(Timestamp executionTime) { + this.executionTime = executionTime; + } + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineResult.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineResult.java new file mode 100644 index 000000000..1ac51e068 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineResult.java @@ -0,0 +1,448 @@ +/* + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalExtensionOnly; +import com.google.cloud.Timestamp; +import com.google.common.base.Preconditions; +import com.google.firestore.v1.Document; +import com.google.firestore.v1.Value; +import com.google.firestore.v1.Write; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * A PipelineResult contains data read from a Firestore Pipeline. The data can be extracted with the + * {@link #getData()} or {@link #get(String)} methods. + * + *

If the PipelineResult represents a non-document result, getReference() will return a null + * value. + * + *

Subclassing Note: Firestore classes are not meant to be subclassed except for use in + * test mocks. Subclassing is not supported in production code and new SDK releases may break code + * that does so. + */ +@InternalExtensionOnly +@BetaApi +public final class PipelineResult { + + private final FirestoreRpcContext rpcContext; + @Nullable private final DocumentReference docRef; + @Nullable private final Map fields; + @Nonnull private final Timestamp executionTime; + @Nullable private final Timestamp updateTime; + @Nullable private final Timestamp createTime; + + PipelineResult( + FirestoreRpcContext rpcContext, + @Nullable DocumentReference docRef, + @Nullable Map fields, + @Nonnull Timestamp executionTime, + @Nullable Timestamp updateTime, + @Nullable Timestamp createTime) { // Elevated access level for mocking. + this.rpcContext = rpcContext; + this.docRef = docRef; + this.fields = fields; + this.executionTime = executionTime; + this.updateTime = updateTime; + this.createTime = createTime; + } + + /** + * Returns the ID of the document represented by this result. Returns null if this result is not + * corresponding to a Firestore document. + */ + @Nullable + @BetaApi + public String getId() { + return docRef.getId(); + } + + static PipelineResult fromDocument( + FirestoreRpcContext rpcContext, Timestamp executionTime, Document document) { + return new PipelineResult( + rpcContext, + document.getName().isEmpty() + ? null + : new DocumentReference(rpcContext, ResourcePath.create(document.getName())), + document.getFieldsMap(), + executionTime, + Timestamp.fromProto(document.getUpdateTime()), + Timestamp.fromProto(document.getCreateTime())); + } + + /** Returns the time at which the pipeline producing this result is executed. */ + @Nullable + @BetaApi + public Timestamp getExecutionTime() { + return executionTime; + } + + /** + * Returns the time at which this document was last updated. Returns null if this result is not + * corresponding to a Firestore document. + */ + @Nullable + @BetaApi + public Timestamp getUpdateTime() { + return updateTime; + } + + /** + * Returns the time at which this document was created. Returns null if this result is not + * corresponding to a Firestore document. + */ + @Nullable + @BetaApi + public Timestamp getCreateTime() { + return createTime; + } + + /** + * Returns whether or not the field exists in the document. Returns false if the document does not + * exist. + * + * @return whether the document existed in this snapshot. + */ + @BetaApi + public boolean exists() { + return fields != null; + } + + /** + * Returns the fields of the result as a Map or null if the result doesn't exist. Field values + * will be converted to their native Java representation. + * + * @return The fields of the document as a Map or null if the result doesn't exist. + */ + @Nonnull + @BetaApi + public Map getData() { + if (fields == null) { + return null; + } + + Map decodedFields = new HashMap<>(); + for (Map.Entry entry : fields.entrySet()) { + Object decodedValue = UserDataConverter.decodeValue(rpcContext, entry.getValue()); + decodedFields.put(entry.getKey(), decodedValue); + } + return decodedFields; + } + + /** + * Returns the contents of the document converted to a POJO or null if the result doesn't exist. + * + * @param valueType The Java class to create + * @return The contents of the document in an object of type T or null if the result doesn't + * exist. + */ + @Nullable + @BetaApi + public T toObject(@Nonnull Class valueType) { + Map data = getData(); + return data == null ? null : CustomClassMapper.convertToCustomClass(data, valueType, docRef); + } + + /** + * Returns whether or not the field exists in the document. Returns false if the result does not + * exist. + * + * @param field the path to the field. + * @return true iff the field exists. + */ + @BetaApi + public boolean contains(@Nonnull String field) { + return contains(FieldPath.fromDotSeparatedString(field)); + } + + /** + * Returns whether or not the field exists in the document. Returns false if the result does not + * exist. + * + * @param fieldPath the path to the field. + * @return true iff the field exists. + */ + @BetaApi + public boolean contains(@Nonnull FieldPath fieldPath) { + return this.extractField(fieldPath) != null; + } + + /** + * Returns the value at the field or null if the field doesn't exist. + * + * @param field The path to the field. + * @return The value at the given field or null. + */ + @Nullable + @BetaApi + public Object get(@Nonnull String field) { + return get(FieldPath.fromDotSeparatedString(field)); + } + + /** + * Returns the value at the field, converted to a POJO, or null if the field or result doesn't + * exist. + * + * @param field The path to the field + * @param valueType The Java class to convert the field value to. + * @return The value at the given field or null. + */ + @Nullable + @BetaApi + public T get(@Nonnull String field, @Nonnull Class valueType) { + return get(FieldPath.fromDotSeparatedString(field), valueType); + } + + /** + * Returns the value at the field or null if the field doesn't exist. + * + * @param fieldPath The path to the field. + * @return The value at the given field or null. + */ + @Nullable + @BetaApi + public Object get(@Nonnull FieldPath fieldPath) { + Value value = extractField(fieldPath); + + if (value == null) { + return null; + } + + return UserDataConverter.decodeValue(rpcContext, value); + } + + /** + * Returns the value at the field, converted to a POJO, or null if the field or result doesn't + * exist. + * + * @param fieldPath The path to the field + * @param valueType The Java class to convert the field value to. + * @return The value at the given field or null. + */ + @Nullable + @BetaApi + public T get(@Nonnull FieldPath fieldPath, Class valueType) { + Object data = get(fieldPath); + return data == null ? null : CustomClassMapper.convertToCustomClass(data, valueType, docRef); + } + + /** Returns the Value Proto at 'fieldPath'. Returns null if the field was not found. */ + @Nullable + Value extractField(@Nonnull FieldPath fieldPath) { + Value value = null; + + if (fields != null) { + Iterator components = fieldPath.getSegments().iterator(); + value = fields.get(components.next()); + + while (value != null && components.hasNext()) { + if (value.getValueTypeCase() != Value.ValueTypeCase.MAP_VALUE) { + return null; + } + value = value.getMapValue().getFieldsOrDefault(components.next(), null); + } + } + + return value; + } + + /** + * Returns the value of the field as a boolean. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a Boolean. + * @return The value of the field. + */ + @Nullable + @BetaApi + public Boolean getBoolean(@Nonnull String field) { + return (Boolean) get(field); + } + + /** + * Returns the value of the field as a double. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a Number. + * @return The value of the field. + */ + @Nullable + @BetaApi + public Double getDouble(@Nonnull String field) { + Number number = (Number) get(field); + return number == null ? null : number.doubleValue(); + } + + /** + * Returns the value of the field as a String. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a String. + * @return The value of the field. + */ + @Nullable + @BetaApi + public String getString(@Nonnull String field) { + return (String) get(field); + } + + /** + * Returns the value of the field as a long. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a Number. + * @return The value of the field. + */ + @Nullable + @BetaApi + public Long getLong(@Nonnull String field) { + Number number = (Number) get(field); + return number == null ? null : number.longValue(); + } + + /** + * Returns the value of the field as a Date. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a Date. + * @return The value of the field. + */ + @Nullable + @BetaApi + public Date getDate(@Nonnull String field) { + Timestamp timestamp = getTimestamp(field); + return timestamp == null ? null : timestamp.toDate(); + } + + /** + * Returns the value of the field as a {@link Timestamp}. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a Date. + * @return The value of the field. + */ + @Nullable + @BetaApi + public Timestamp getTimestamp(@Nonnull String field) { + return (Timestamp) get(field); + } + + /** + * Returns the value of the field as a Blob. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a Blob. + * @return The value of the field. + */ + @Nullable + @BetaApi + public Blob getBlob(@Nonnull String field) { + return (Blob) get(field); + } + + /** + * Returns the value of the field as a GeoPoint. + * + * @param field The path to the field. + * @throws RuntimeException if the value is not a GeoPoint. + * @return The value of the field. + */ + @Nullable + @BetaApi + public GeoPoint getGeoPoint(@Nonnull String field) { + return (GeoPoint) get(field); + } + + /** + * Gets the reference to the document. + * + * @return The reference to the document. + */ + @BetaApi + public DocumentReference getReference() { + return docRef; + } + + /** Checks whether this DocumentSnapshot contains any fields. */ + boolean isEmpty() { + return fields == null || fields.isEmpty(); + } + + Map getProtoFields() { + return fields; + } + + Write.Builder toPb() { + Preconditions.checkState(exists(), "Can't call toDocument() on a document that doesn't exist"); + Write.Builder write = Write.newBuilder(); + Document.Builder document = write.getUpdateBuilder(); + document.setName(docRef.getName()); + document.putAllFields(fields); + return write; + } + + Document.Builder toDocumentPb() { + Preconditions.checkState(exists(), "Can't call toDocument() on a document that doesn't exist"); + Document.Builder document = Document.newBuilder(); + return document + .setName(docRef.getName()) + .putAllFields(fields) + .setCreateTime(createTime.toProto()) + .setUpdateTime(updateTime.toProto()); + } + + /** + * Returns true if the document's data and path in this DocumentSnapshot equals the provided + * snapshot. + * + * @param obj The object to compare against. + * @return Whether this DocumentSnapshot is equal to the provided object. + */ + @Override + @BetaApi + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null || !(obj instanceof PipelineResult)) { + return false; + } + PipelineResult that = (PipelineResult) obj; + return Objects.equals(rpcContext, that.rpcContext) + && Objects.equals(docRef, that.docRef) + && Objects.equals(fields, that.fields); + } + + @Override + public int hashCode() { + return Objects.hash(rpcContext, docRef, fields); + } + + @Override + public String toString() { + return String.format( + "%s{doc=%s, fields=%s, executionTime=%s, updateTime=%s, createTime=%s}", + getClass().getSimpleName(), docRef, fields, executionTime, updateTime, createTime); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineSnapshot.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineSnapshot.java new file mode 100644 index 000000000..703caad4e --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineSnapshot.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore; + +import com.google.api.core.BetaApi; +import com.google.cloud.Timestamp; +import java.util.List; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * A PipelineSnapshot contains the results of a pipeline execution. It can be used to access the + * documents, execution time, and explain stats. + */ +@BetaApi +public final class PipelineSnapshot { + + private final Pipeline pipeline; + private final Timestamp executionTime; + private final List results; + private final ExplainStats explainStats; + + PipelineSnapshot( + @Nonnull Pipeline pipeline, + @Nonnull List results, + @Nonnull Timestamp executionTime, + @Nullable ExplainStats explainStats) { + this.pipeline = pipeline; + this.results = results; + this.executionTime = executionTime; + this.explainStats = explainStats; + } + + /** + * The Pipeline on which you called `execute()` in order to get this `PipelineSnapshot`. + * + * @return The pipeline that was executed. + */ + @Nonnull + public Pipeline getPipeline() { + return pipeline; + } + + /** + * An array of all the results in the `PipelineSnapshot`. + * + * @return The list of results. + */ + @Nonnull + public List getResults() { + return results; + } + + /** + * The time at which the pipeline producing this result is executed. + * + * @return The execution time of the pipeline. + */ + @Nonnull + public Timestamp getExecutionTime() { + return executionTime; + } + + /** + * Return stats from query explain. + * + *

If `explainOptions.mode` was set to `execute` or left unset, then this returns `null`. + * + * @return The explain stats, or `null` if not available. + */ + @Nullable + public ExplainStats getExplainStats() { + return explainStats; + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineSource.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineSource.java new file mode 100644 index 000000000..8c8a1b13b --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineSource.java @@ -0,0 +1,165 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.pipeline.stages.Collection; +import com.google.cloud.firestore.pipeline.stages.CollectionGroup; +import com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions; +import com.google.cloud.firestore.pipeline.stages.CollectionOptions; +import com.google.cloud.firestore.pipeline.stages.Database; +import com.google.cloud.firestore.pipeline.stages.Documents; +import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; + +/** + * A factory for creating {@link Pipeline} instances, which provide a framework for building data + * transformation and query pipelines for Firestore. + * + *

Start by calling {@link Firestore#pipeline()} to obtain an instance of {@code PipelineSource}. + * From there, you can use the provided methods (like {@link #collection(String)}) to specify the + * data source for your pipeline. + * + *

This class is typically used to start building Firestore pipelines. It allows you to define + * the initial data source for a pipeline. + * + *

Example Usage: + * + *

{@code
+ * firestore.pipeline() // Get a PipelineSource instance
+ *   .collection("users") // Create a pipeline that operates on a collection
+ *   .select("name"); // Add stages to the pipeline
+ * }
+ */ +@BetaApi +public final class PipelineSource { + private final FirestoreRpcContext rpcContext; + + @InternalApi + PipelineSource(FirestoreRpcContext rpcContext) { + this.rpcContext = rpcContext; + } + + /** + * Creates a new {@link Pipeline} that operates on the specified Firestore collection. + * + * @param path The path to the Firestore collection (e.g., "users"). + * @return A new {@code Pipeline} instance targeting the specified collection. + */ + @Nonnull + @BetaApi + public Pipeline collection(@Nonnull String path) { + return collection(path, new CollectionOptions()); + } + + @Nonnull + @BetaApi + public Pipeline collection(@Nonnull String path, CollectionOptions options) { + return new Pipeline(this.rpcContext, new Collection(path, options)); + } + + @Nonnull + @BetaApi + public Pipeline collection(@Nonnull CollectionReference ref) { + if (!this.rpcContext.getFirestore().equals(ref.getFirestore())) { + throw new IllegalArgumentException( + "Invalid CollectionReference. The Firestore instance of the CollectionReference must match the Firestore instance of the PipelineSource."); + } + + return collection(ref.getPath(), new CollectionOptions()); + } + + /** + * Creates a new {@link Pipeline} that operates on all documents in a collection group. + * + *

A collection group consists of all collections with the same ID. For example, if you have + * collections named "users" under different documents, you can query them together using a + * collection group query. + * + * @param collectionId The ID of the collection group. + * @return A new {@code Pipeline} instance targeting the specified collection group. + */ + @Nonnull + @BetaApi + public Pipeline collectionGroup(@Nonnull String collectionId) { + return collectionGroup(collectionId, new CollectionGroupOptions()); + } + + @Nonnull + @BetaApi + public Pipeline collectionGroup(@Nonnull String collectionId, CollectionGroupOptions options) { + Preconditions.checkArgument( + !collectionId.contains("/"), + "Invalid collectionId '%s'. Collection IDs must not contain '/'.", + collectionId); + return new Pipeline(this.rpcContext, new CollectionGroup(collectionId, options)); + } + + /** + * Creates a new {@link Pipeline} that operates on all documents in the Firestore database. + * + *

Use this method with caution as it can lead to very large result sets. It is usually only + * useful at development stage. + * + * @return A new {@code Pipeline} instance targeting all documents in the database. + */ + @Nonnull + @BetaApi + public Pipeline database() { + return new Pipeline(this.rpcContext, new Database()); + } + + /** + * Creates a new {@link Pipeline} that operates on a specific set of Firestore documents. + * + * @param docs The {@link DocumentReference} instances representing the documents to include in + * the pipeline. + * @return A new {@code Pipeline} instance targeting the specified documents. + */ + @Nonnull + @BetaApi + public Pipeline documents(DocumentReference... docs) { + return new Pipeline(this.rpcContext, Documents.of(docs)); + } + + /** + * Creates a new {@link Pipeline} from the given {@link Query}. Under the hood, this will + * translate the query semantics (order by document ID, etc.) to an equivalent pipeline. + * + * @param query The {@link Query} to translate into the resulting pipeline. + * @return A new {@code Pipeline} that is equivalent to the given query. + */ + @Nonnull + @BetaApi + public Pipeline createFrom(Query query) { + return query.pipeline(); + } + + /** + * Creates a new {@link Pipeline} from the given {@link AggregateQuery}. Under the hood, this will + * translate the query semantics (order by document ID, etc.) to an equivalent pipeline. + * + * @param query The {@link AggregateQuery} to translate into the resulting pipeline. + * @return A new {@code Pipeline} that is equivalent to the given query. + */ + @Nonnull + @BetaApi + public Pipeline createFrom(AggregateQuery query) { + return query.pipeline(); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineUtils.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineUtils.java new file mode 100644 index 000000000..a28424d0d --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineUtils.java @@ -0,0 +1,239 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore; + +import static com.google.cloud.firestore.pipeline.expressions.AggregateFunction.countAll; +import static com.google.cloud.firestore.pipeline.expressions.Expr.and; +import static com.google.cloud.firestore.pipeline.expressions.Expr.arrayContainsAny; +import static com.google.cloud.firestore.pipeline.expressions.Expr.eqAny; +import static com.google.cloud.firestore.pipeline.expressions.Expr.field; +import static com.google.cloud.firestore.pipeline.expressions.Expr.not; +import static com.google.cloud.firestore.pipeline.expressions.Expr.or; +import static com.google.cloud.firestore.pipeline.expressions.FunctionUtils.aggregateFunctionToValue; +import static com.google.cloud.firestore.pipeline.expressions.FunctionUtils.exprToValue; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.Query.ComparisonFilterInternal; +import com.google.cloud.firestore.Query.CompositeFilterInternal; +import com.google.cloud.firestore.Query.FilterInternal; +import com.google.cloud.firestore.Query.LimitType; +import com.google.cloud.firestore.Query.UnaryFilterInternal; +import com.google.cloud.firestore.pipeline.expressions.AggregateFunction; +import com.google.cloud.firestore.pipeline.expressions.AliasedAggregate; +import com.google.cloud.firestore.pipeline.expressions.AliasedExpr; +import com.google.cloud.firestore.pipeline.expressions.BooleanExpr; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.cloud.firestore.pipeline.expressions.Field; +import com.google.cloud.firestore.pipeline.expressions.Selectable; +import com.google.common.collect.Lists; +import com.google.firestore.v1.Cursor; +import com.google.firestore.v1.MapValue; +import com.google.firestore.v1.Value; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@InternalApi +public class PipelineUtils { + @InternalApi + public static Value encodeValue(Object value) { + return UserDataConverter.encodeValue(FieldPath.empty(), value, UserDataConverter.ARGUMENT); + } + + @InternalApi + public static Value encodeValue(Expr value) { + return exprToValue(value); + } + + @InternalApi + public static Value encodeValue(AggregateFunction value) { + return aggregateFunctionToValue(value); + } + + @InternalApi + public static Value encodeValue(String value) { + return Value.newBuilder().setStringValue(value).build(); + } + + @InternalApi + public static Value encodeValue(boolean value) { + return Value.newBuilder().setBooleanValue(value).build(); + } + + @InternalApi + public static Value encodeValue(long value) { + return Value.newBuilder().setIntegerValue(value).build(); + } + + @InternalApi + public static Value encodeValue(double value) { + return Value.newBuilder().setDoubleValue(value).build(); + } + + @InternalApi + public static Value encodeValue(Map options) { + return Value.newBuilder() + .setMapValue(MapValue.newBuilder().putAllFields(options).build()) + .build(); + } + + @InternalApi + static BooleanExpr toPipelineBooleanExpr(FilterInternal f) { + if (f instanceof ComparisonFilterInternal) { + ComparisonFilterInternal comparisonFilter = (ComparisonFilterInternal) f; + Field field = Field.ofServerPath(comparisonFilter.fieldReference.getFieldPath()); + Value value = comparisonFilter.value; + switch (comparisonFilter.operator) { + case LESS_THAN: + return and(field.exists(), field.lt(value)); + case LESS_THAN_OR_EQUAL: + return and(field.exists(), field.lte(value)); + case GREATER_THAN: + return and(field.exists(), field.gt(value)); + case GREATER_THAN_OR_EQUAL: + return and(field.exists(), field.gte(value)); + case EQUAL: + return and(field.exists(), field.eq(value)); + case NOT_EQUAL: + return and(field.exists(), not(field.eq(value))); + case ARRAY_CONTAINS: + return and(field.exists(), field.arrayContains(value)); + case IN: + List valuesList = value.getArrayValue().getValuesList(); + return and(field.exists(), eqAny(field, Lists.newArrayList(valuesList))); + case ARRAY_CONTAINS_ANY: + List valuesListAny = value.getArrayValue().getValuesList(); + return and(field.exists(), arrayContainsAny(field, Lists.newArrayList(valuesListAny))); + case NOT_IN: + List notInValues = value.getArrayValue().getValuesList(); + return and(field.exists(), not(eqAny(field, Lists.newArrayList(notInValues)))); + default: + // Handle OPERATOR_UNSPECIFIED and UNRECOGNIZED cases as needed + throw new IllegalArgumentException("Unsupported operator: " + comparisonFilter.operator); + } + } else if (f instanceof CompositeFilterInternal) { + CompositeFilterInternal compositeFilter = (CompositeFilterInternal) f; + switch (compositeFilter.getOperator()) { + case AND: + List conditions = + compositeFilter.getFilters().stream() + .map(PipelineUtils::toPipelineBooleanExpr) + .collect(Collectors.toList()); + return and( + conditions.get(0), + conditions.subList(1, conditions.size()).toArray(new BooleanExpr[0])); + case OR: + List orConditions = + compositeFilter.getFilters().stream() + .map(PipelineUtils::toPipelineBooleanExpr) + .collect(Collectors.toList()); + return or( + orConditions.get(0), + orConditions.subList(1, orConditions.size()).toArray(new BooleanExpr[0])); + default: + // Handle OPERATOR_UNSPECIFIED and UNRECOGNIZED cases as needed + throw new IllegalArgumentException( + "Unsupported operator: " + compositeFilter.getOperator()); + } + } else if (f instanceof UnaryFilterInternal) { + UnaryFilterInternal unaryFilter = (UnaryFilterInternal) f; + Field field = Field.ofServerPath(unaryFilter.fieldReference.getFieldPath()); + switch (unaryFilter.getOperator()) { + case IS_NAN: + return and(field.exists(), field.isNaN()); + case IS_NULL: + return and(field.exists(), field.isNull()); + case IS_NOT_NAN: + return and(field.exists(), field.isNotNaN()); + case IS_NOT_NULL: + return and(field.exists(), field.isNotNull()); + default: + // Handle OPERATOR_UNSPECIFIED and UNRECOGNIZED cases as needed + throw new IllegalArgumentException("Unsupported operator: " + unaryFilter.getOperator()); + } + } else { + // Handle other FilterInternal types as needed + throw new IllegalArgumentException("Unsupported filter type: " + f.getClass().getName()); + } + } + + @InternalApi + static Pipeline toPaginatedPipeline( + Pipeline pipeline, + Cursor start, + Cursor end, + Integer limit, + LimitType limitType, + Integer offset) { + throw new UnsupportedOperationException( + "Converting to pagination pipeline is not support yet."); + } + + @InternalApi + static AliasedAggregate toPipelineAggregatorTarget(AggregateField f) { + String operator = f.getOperator(); + String fieldPath = f.getFieldPath(); + + switch (operator) { + case "sum": + return Field.ofServerPath(fieldPath).sum().as(f.getAlias()); + + case "count": + return countAll().as(f.getAlias()); + case "average": + return Field.ofServerPath(fieldPath).avg().as(f.getAlias()); + default: + // Handle the 'else' case appropriately in your Java code + throw new IllegalArgumentException("Unsupported operator: " + operator); + } + } + + @InternalApi + static BooleanExpr toPipelineExistsExpr(AggregateField f) { + String fieldPath = f.getFieldPath(); + + if (fieldPath.isEmpty()) { + return null; + } + return Field.ofServerPath(fieldPath).exists(); + } + + @InternalApi + public static Map selectablesToMap(Selectable... selectables) { + Map projMap = new HashMap<>(); + for (Selectable proj : selectables) { + if (proj instanceof Field) { + Field fieldProj = (Field) proj; + projMap.put(fieldProj.getPath().getEncodedPath(), fieldProj); + } else if (proj instanceof AliasedExpr) { + AliasedExpr aliasedExpr = (AliasedExpr) proj; + projMap.put(aliasedExpr.getAlias(), aliasedExpr.getExpr()); + } + } + return projMap; + } + + @InternalApi + public static Map fieldNamesToMap(String... fields) { + Map projMap = new HashMap<>(); + for (String field : fields) { + projMap.put(field, field(field)); + } + return projMap; + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java index 4721ba93d..20ebd8ccb 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java @@ -16,6 +16,10 @@ package com.google.cloud.firestore; +import static com.google.cloud.firestore.PipelineUtils.toPipelineBooleanExpr; +import static com.google.cloud.firestore.pipeline.expressions.Expr.and; +import static com.google.cloud.firestore.pipeline.expressions.Expr.eq; +import static com.google.cloud.firestore.pipeline.expressions.Expr.or; import static com.google.cloud.firestore.telemetry.TraceUtil.*; import static com.google.common.collect.Lists.reverse; import static com.google.firestore.v1.StructuredQuery.FieldFilter.Operator.ARRAY_CONTAINS; @@ -39,6 +43,10 @@ import com.google.auto.value.AutoValue; import com.google.cloud.Timestamp; import com.google.cloud.firestore.Query.QueryOptions.Builder; +import com.google.cloud.firestore.pipeline.expressions.BooleanExpr; +import com.google.cloud.firestore.pipeline.expressions.Field; +import com.google.cloud.firestore.pipeline.expressions.Ordering; +import com.google.cloud.firestore.pipeline.expressions.Selectable; import com.google.cloud.firestore.telemetry.TraceUtil; import com.google.cloud.firestore.telemetry.TraceUtil.Scope; import com.google.cloud.firestore.v1.FirestoreSettings; @@ -57,6 +65,7 @@ import com.google.firestore.v1.StructuredQuery.FieldReference; import com.google.firestore.v1.StructuredQuery.Filter; import com.google.firestore.v1.StructuredQuery.Order; +import com.google.firestore.v1.StructuredQuery.UnaryFilter; import com.google.firestore.v1.Value; import com.google.protobuf.ByteString; import com.google.protobuf.Int32Value; @@ -173,6 +182,11 @@ public List getFilters() { return filters; } + @Nonnull + CompositeFilter.Operator getOperator() { + return this.operator; + } + @Nullable @Override public FieldReference getFirstInequalityField() { @@ -238,7 +252,7 @@ public List getFlattenedFilters() { } } - private static class UnaryFilterInternal extends FieldFilterInternal { + static class UnaryFilterInternal extends FieldFilterInternal { private final StructuredQuery.UnaryFilter.Operator operator; @@ -265,6 +279,11 @@ Filter toProto() { return result.build(); } + @Nonnull + UnaryFilter.Operator getOperator() { + return this.operator; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -1397,9 +1416,7 @@ StructuredQuery.Builder buildQuery() { if (options.getStartCursor() != null) { // Swap the cursors to match the flipped query ordering. Cursor cursor = - options - .getStartCursor() - .toBuilder() + options.getStartCursor().toBuilder() .setBefore(!options.getStartCursor().getBefore()) .build(); structuredQuery.setEndAt(cursor); @@ -1408,9 +1425,7 @@ StructuredQuery.Builder buildQuery() { if (options.getEndCursor() != null) { // Swap the cursors to match the flipped query ordering. Cursor cursor = - options - .getEndCursor() - .toBuilder() + options.getEndCursor().toBuilder() .setBefore(!options.getEndCursor().getBefore()) .build(); structuredQuery.setStartAt(cursor); @@ -2127,6 +2142,143 @@ public AggregateQuery aggregate( return new AggregateQuery(this, aggregateFieldList); } + Pipeline pipeline() { + // From + Pipeline ppl = + this.options.getAllDescendants() + ? new PipelineSource(this.rpcContext).collectionGroup(this.options.getCollectionId()) + : new PipelineSource(this.rpcContext) + .collection( + this.options.getParentPath().append(this.options.getCollectionId()).getPath()); + + // Filters + for (FilterInternal f : this.options.getFilters()) { + ppl = ppl.where(toPipelineBooleanExpr(f)); + } + + // Projections + if (this.options.getFieldProjections() != null + && !this.options.getFieldProjections().isEmpty()) { + ppl = + ppl.select( + this.options.getFieldProjections().stream() + .map(fieldReference -> Field.ofServerPath(fieldReference.getFieldPath())) + .toArray(Selectable[]::new)); + } + + // Orders + List normalizedOrderBy = createImplicitOrderBy(); + int size = normalizedOrderBy.size(); + List fields = new ArrayList<>(size); + List orderings = new ArrayList<>(size); + for (FieldOrder order : normalizedOrderBy) { + Field field = Field.ofServerPath(order.fieldReference.getFieldPath()); + fields.add(field); + if (order.direction == Direction.ASCENDING) { + orderings.add(field.ascending()); + } else { + orderings.add(field.descending()); + } + } + + if (fields.size() == 1) { + ppl = ppl.where(fields.get(0).exists()); + } else { + ppl = + ppl.where( + and( + fields.get(0).exists(), + fields.subList(1, fields.size()).stream() + .map((Field field) -> field.exists()) + .toArray(BooleanExpr[]::new))); + } + + // Cursors, Limit, Offset + if (this.options.getStartCursor() != null) { + ppl = ppl.where(whereConditionsFromCursor(options.getStartCursor(), orderings, true)); + } + + if (this.options.getEndCursor() != null) { + ppl = ppl.where(whereConditionsFromCursor(options.getEndCursor(), orderings, false)); + } + + if (options.getLimit() != null) { + // TODO: Handle situation where user enters limit larger than integer. + if (options.getLimitType() == LimitType.First) { + ppl = ppl.sort(orderings.toArray(new Ordering[0])); + ppl = ppl.limit(options.getLimit()); + } else { + if (options.getFieldOrders().isEmpty()) { + throw new IllegalStateException( + "limitToLast() queries require specifying at least one orderBy() clause"); + } + + List reversedOrderings = new ArrayList<>(); + for (Ordering ordering : orderings) { + reversedOrderings.add(reverseOrdering(ordering)); + } + ppl = ppl.sort(reversedOrderings.toArray(new Ordering[0])); + ppl = ppl.limit(options.getLimit()); + ppl = ppl.sort(orderings.toArray(new Ordering[0])); + } + } else { + ppl = ppl.sort(orderings.toArray(new Ordering[0])); + } + + return ppl; + } + + private static Ordering reverseOrdering(Ordering ordering) { + if (ordering.getDir() == Ordering.Direction.ASCENDING) { + return ordering.getExpr().descending(); + } else { + return ordering.getExpr().ascending(); + } + } + + private static BooleanExpr getCursorExclusiveCondition( + boolean isStart, Ordering ordering, Value value) { + if (isStart && ordering.getDir() == Ordering.Direction.ASCENDING + || !isStart && ordering.getDir() == Ordering.Direction.DESCENDING) { + return ordering.getExpr().gt(value); + } else { + return ordering.getExpr().lt(value); + } + } + + private static BooleanExpr whereConditionsFromCursor( + Cursor bound, List orderings, boolean isStart) { + List boundPosition = bound.getValuesList(); + int size = boundPosition.size(); + if (size > orderings.size()) { + throw new IllegalArgumentException("Bound positions must not exceed order fields."); + } + + int last = size - 1; + BooleanExpr condition = + getCursorExclusiveCondition(isStart, orderings.get(last), boundPosition.get(last)); + if (isBoundInclusive(bound, isStart)) { + condition = or(condition, eq(orderings.get(last).getExpr(), boundPosition.get(last))); + } + for (int i = size - 2; i >= 0; i--) { + final Ordering ordering = orderings.get(i); + final Value value = boundPosition.get(i); + condition = + or( + getCursorExclusiveCondition(isStart, ordering, value), + and(ordering.getExpr().eq(value), condition)); + } + return condition; + } + + private static boolean isBoundInclusive(Cursor bound, boolean isStart) { + if (isStart) { + return bound.getBefore(); + } else { + return !bound.getBefore(); + } + } + /** * Returns true if this Query is equal to the provided object. * diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ReadTimeTransaction.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ReadTimeTransaction.java index 0c423469a..581a9125e 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ReadTimeTransaction.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ReadTimeTransaction.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions; import com.google.cloud.firestore.telemetry.TraceUtil; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.MoreExecutors; @@ -125,6 +126,21 @@ public ApiFuture get(@Nonnull AggregateQuery query) { } } + @Nonnull + @Override + public ApiFuture execute(@Nonnull Pipeline pipeline) { + return execute(pipeline, new PipelineExecuteOptions()); + } + + @Nonnull + @Override + public ApiFuture execute( + @Nonnull Pipeline pipeline, @Nonnull PipelineExecuteOptions options) { + try (TraceUtil.Scope ignored = transactionTraceContext.makeCurrent()) { + return pipeline.execute(options, null, readTime); + } + } + @Nonnull @Override public Transaction create( diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransaction.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransaction.java index 5d366c965..84317c904 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransaction.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransaction.java @@ -19,6 +19,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.cloud.firestore.TransactionOptions.TransactionOptionsType; +import com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions; import com.google.cloud.firestore.telemetry.TraceUtil; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.MoreExecutors; @@ -260,4 +261,19 @@ public ApiFuture get(@Nonnull AggregateQuery query) { return query.get(transactionId, null); } } + + @Nonnull + @Override + public ApiFuture execute(@Nonnull Pipeline pipeline) { + return execute(pipeline, new PipelineExecuteOptions()); + } + + @Nonnull + @Override + public ApiFuture execute( + @Nonnull Pipeline pipeline, @Nonnull PipelineExecuteOptions options) { + try (TraceUtil.Scope ignored = transactionTraceContext.makeCurrent()) { + return pipeline.execute(new PipelineExecuteOptions(), transactionId, null); + } + } } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java index db8ebff63..f6b97d9d3 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java @@ -253,8 +253,8 @@ private ApiFuture restartTransactionCallback(Throwable throwable) { /** Determines whether the provided error is considered retryable. */ private static boolean isRetryableTransactionError(ApiException exception) { switch (exception.getStatusCode().getCode()) { - // This list is based on - // https://github.com/firebase/firebase-js-sdk/blob/c822e78b00dd3420dcc749beb2f09a947aa4a344/packages/firestore/src/core/transaction_runner.ts#L112 + // This list is based on + // https://github.com/firebase/firebase-js-sdk/blob/c822e78b00dd3420dcc749beb2f09a947aa4a344/packages/firestore/src/core/transaction_runner.ts#L112 case ABORTED: case CANCELLED: case UNKNOWN: diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Transaction.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Transaction.java index 04d83a1a1..699ef04ac 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Transaction.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Transaction.java @@ -17,7 +17,9 @@ package com.google.cloud.firestore; import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; import com.google.api.core.InternalExtensionOnly; +import com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions; import com.google.cloud.firestore.telemetry.TraceUtil; import com.google.cloud.firestore.telemetry.TraceUtil.Context; import java.util.List; @@ -134,4 +136,19 @@ public abstract ApiFuture> getAll( */ @Nonnull public abstract ApiFuture get(@Nonnull AggregateQuery query); + + /** + * @return The result of the aggregation. + */ + @Nonnull + @BetaApi + public abstract ApiFuture execute(@Nonnull Pipeline pipeline); + + /** + * @return The result of the aggregation. + */ + @Nonnull + @BetaApi + public abstract ApiFuture execute( + @Nonnull Pipeline pipeline, @Nonnull PipelineExecuteOptions options); } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/TransactionOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/TransactionOptions.java index 57d13e0ed..3c1575c8a 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/TransactionOptions.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/TransactionOptions.java @@ -72,7 +72,9 @@ public int getNumberOfAttempts() { return numberOfAttempts; } - /** @return Executor to be used to run user callbacks on */ + /** + * @return Executor to be used to run user callbacks on + */ @Nullable public Executor getExecutor() { return executor; @@ -214,7 +216,9 @@ public B setExecutor(@Nullable Executor executor) { return (B) this; } - /** @return an instance of {@link TransactionOptions} from the values passed to this builder */ + /** + * @return an instance of {@link TransactionOptions} from the values passed to this builder + */ @Nonnull public abstract TransactionOptions build(); } @@ -232,7 +236,9 @@ private ReadOnlyOptionsBuilder(@Nullable Executor executor, @Nullable Timestamp this.readTime = readTime; } - /** @return the currently set value that will be used as the readTime. */ + /** + * @return the currently set value that will be used as the readTime. + */ @Nullable public TimestampOrBuilder getReadTime() { return readTime; diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UserDataConverter.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UserDataConverter.java index 4914cbb09..ade312e94 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UserDataConverter.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UserDataConverter.java @@ -16,7 +16,12 @@ package com.google.cloud.firestore; +import static com.google.cloud.firestore.pipeline.expressions.FunctionUtils.aggregateFunctionToValue; +import static com.google.cloud.firestore.pipeline.expressions.FunctionUtils.exprToValue; + import com.google.cloud.Timestamp; +import com.google.cloud.firestore.pipeline.expressions.AggregateFunction; +import com.google.cloud.firestore.pipeline.expressions.Expr; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -38,6 +43,9 @@ /** Converts user input into the Firestore Value representation. */ class UserDataConverter { + + static final Value NULL_VALUE = Value.newBuilder().setNullValue(NullValue.NULL_VALUE).build(); + private static final Logger LOGGER = Logger.getLogger(UserDataConverter.class.getName()); /** Controls the behavior for field deletes. */ @@ -117,8 +125,9 @@ static Value encodeValue( + " as an argument at field '%s'.", path); return null; + } else if (sanitizedObject == null) { - return Value.newBuilder().setNullValue(NullValue.NULL_VALUE).build(); + return NULL_VALUE; } else if (sanitizedObject instanceof String) { return Value.newBuilder().setStringValue((String) sanitizedObject).build(); } else if (sanitizedObject instanceof Integer) { @@ -159,6 +168,10 @@ static Value encodeValue( } else if (sanitizedObject instanceof Blob) { Blob blob = (Blob) sanitizedObject; return Value.newBuilder().setBytesValue(blob.toByteString()).build(); + } else if (sanitizedObject instanceof Expr) { + return exprToValue((Expr) sanitizedObject); + } else if (sanitizedObject instanceof AggregateFunction) { + return aggregateFunctionToValue((AggregateFunction) sanitizedObject); } else if (sanitizedObject instanceof Value) { return (Value) sanitizedObject; } else if (sanitizedObject instanceof DocumentReference) { diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AggregateFunction.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AggregateFunction.java new file mode 100644 index 000000000..6416a1e7a --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AggregateFunction.java @@ -0,0 +1,129 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.BetaApi; +import com.google.common.collect.ImmutableList; +import com.google.firestore.v1.Value; +import java.util.stream.Collectors; + +@BetaApi +public class AggregateFunction { + private final String name; + private final ImmutableList params; + + private AggregateFunction(String name, Expr... params) { + this.name = name; + this.params = ImmutableList.copyOf(params); + } + + private AggregateFunction(String name, String fieldName) { + this(name, Expr.field(fieldName)); + } + + @BetaApi + public static AggregateFunction generic(String name, Expr... expr) { + return new AggregateFunction(name, expr); + } + + @BetaApi + public static AggregateFunction countAll() { + return new AggregateFunction("count"); + } + + @BetaApi + public static AggregateFunction count(String fieldName) { + return new AggregateFunction("count", fieldName); + } + + @BetaApi + public static AggregateFunction count(Expr expression) { + return new AggregateFunction("count", expression); + } + + @BetaApi + public static AggregateFunction countDistinct(String fieldName) { + return new AggregateFunction("count_distinct", fieldName); + } + + @BetaApi + public static AggregateFunction countDistinct(Expr expression) { + return new AggregateFunction("count_distinct", expression); + } + + @BetaApi + public static AggregateFunction countIf(BooleanExpr condition) { + return new AggregateFunction("count_if", condition); + } + + @BetaApi + public static AggregateFunction sum(String fieldName) { + return new AggregateFunction("sum", fieldName); + } + + @BetaApi + public static AggregateFunction sum(Expr expression) { + return new AggregateFunction("sum", expression); + } + + @BetaApi + public static AggregateFunction avg(String fieldName) { + return new AggregateFunction("avg", fieldName); + } + + @BetaApi + public static AggregateFunction avg(Expr expression) { + return new AggregateFunction("avg", expression); + } + + @BetaApi + public static AggregateFunction minimum(String fieldName) { + return new AggregateFunction("min", fieldName); + } + + @BetaApi + public static AggregateFunction minimum(Expr expression) { + return new AggregateFunction("min", expression); + } + + @BetaApi + public static AggregateFunction maximum(String fieldName) { + return new AggregateFunction("max", fieldName); + } + + @BetaApi + public static AggregateFunction maximum(Expr expression) { + return new AggregateFunction("max", expression); + } + + @BetaApi + public AliasedAggregate as(String alias) { + return new AliasedAggregate(alias, this); + } + + Value toProto() { + return Value.newBuilder() + .setFunctionValue( + com.google.firestore.v1.Function.newBuilder() + .setName(this.name) + .addAllArgs( + this.params.stream() + .map(FunctionUtils::exprToValue) + .collect(Collectors.toList()))) + .build(); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AliasedAggregate.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AliasedAggregate.java new file mode 100644 index 000000000..573785972 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AliasedAggregate.java @@ -0,0 +1,38 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.BetaApi; + +@BetaApi +public class AliasedAggregate { + private final String alias; + private final AggregateFunction expr; + + AliasedAggregate(String alias, AggregateFunction expr) { + this.alias = alias; + this.expr = expr; + } + + public String getAlias() { + return alias; + } + + public AggregateFunction getExpr() { + return expr; + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AliasedExpr.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AliasedExpr.java new file mode 100644 index 000000000..ff6ffc600 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/AliasedExpr.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.InternalApi; +import com.google.firestore.v1.Value; + +@InternalApi +public final class AliasedExpr extends Expr implements Selectable { + + private final String alias; + private final T expr; + + @InternalApi + AliasedExpr(T expr, String alias) { + this.expr = expr; + this.alias = alias; + } + + @InternalApi + public String getAlias() { + return alias; + } + + @InternalApi + public T getExpr() { + return expr; + } + + @Override + public Selectable as(String alias) { + return new AliasedExpr<>(this.expr, alias); + } + + @Override + Value toProto() { + return expr.toProto(); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/BooleanExpr.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/BooleanExpr.java new file mode 100644 index 000000000..4a27dc633 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/BooleanExpr.java @@ -0,0 +1,32 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.BetaApi; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; + +@BetaApi +public class BooleanExpr extends FunctionExpr { + BooleanExpr(String name, Expr... params) { + super(name, Lists.newArrayList(params)); + } + + BooleanExpr(String name, ImmutableList params) { + super(name, params); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Constant.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Constant.java new file mode 100644 index 000000000..b0fbe8a98 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Constant.java @@ -0,0 +1,157 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.cloud.Timestamp; +import com.google.cloud.firestore.Blob; +import com.google.cloud.firestore.DocumentReference; +import com.google.cloud.firestore.FieldValue; +import com.google.cloud.firestore.GeoPoint; +import com.google.cloud.firestore.VectorValue; +import com.google.firestore.v1.Value; +import java.util.Arrays; +import java.util.Date; +import java.util.Map; + +@BetaApi +public final class Constant extends Expr { + + static final Constant NULL = new Constant(null); + + private final Object value; + + Constant(Object value) { + this.value = value; + } + + @BetaApi + public static Constant of(String value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(Number value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(Date value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(Timestamp value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(Boolean value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(GeoPoint value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(Blob value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(DocumentReference value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(byte[] value) { + return new Constant(value); + } + + @InternalApi + public static Constant of(Value value) { + return new Constant(value); + } + + @InternalApi + public static Constant nullValue() { + return NULL; + } + + @BetaApi + static Constant of(Object value) { + if (value == null) { + return NULL; + } else if (value instanceof String) { + return of((String) value); + } else if (value instanceof Number) { + return of((Number) value); + } else if (value instanceof Date) { + return of((Date) value); + } else if (value instanceof Timestamp) { + return of((Timestamp) value); + } else if (value instanceof Boolean) { + return of((Boolean) value); + } else if (value instanceof GeoPoint) { + return of((GeoPoint) value); + } else if (value instanceof Blob) { + return of((Blob) value); + } else if (value instanceof DocumentReference) { + return of((DocumentReference) value); + } else if (value instanceof byte[]) { + return of((byte[]) value); + } else if (value instanceof Value) { + return of((Value) value); + } else if (value instanceof VectorValue) { + return vector(((VectorValue) value).toArray()); + } else if (value instanceof Constant) { + return (Constant) value; + } else { + throw new IllegalArgumentException("Unknown type: " + value); + } + } + + @BetaApi + public static Constant of(Iterable value) { + return new Constant(value); + } + + @BetaApi + public static Constant of(Object[] value) { + return new Constant(Arrays.asList(value.clone())); // Convert array to list + } + + @BetaApi + public static Constant of(Map value) { + return new Constant(value); + } + + @BetaApi + public static Constant vector(double[] value) { + return new Constant(FieldValue.vector(value)); + } + + @Override + Value toProto() { + return encodeValue(value); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expr.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expr.java new file mode 100644 index 000000000..1d88e9209 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expr.java @@ -0,0 +1,4151 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.cloud.Timestamp; +import com.google.cloud.firestore.Blob; +import com.google.cloud.firestore.DocumentReference; +import com.google.cloud.firestore.FieldPath; +import com.google.cloud.firestore.GeoPoint; +import com.google.cloud.firestore.VectorValue; +import com.google.common.collect.ImmutableList; +import com.google.firestore.v1.Value; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * Represents an expression that can be evaluated to a value within the execution of a {@link + * com.google.cloud.firestore.Pipeline}. + * + *

Expressions are the building blocks for creating complex queries and transformations in + * Firestore pipelines. They can represent: + * + *

    + *
  • **Field references:** Access values from document fields. + *
  • **Literals:** Represent constant values (strings, numbers, booleans). + *
  • **Function calls:** Apply functions to one or more expressions. + *
+ * + *

The `Expr` class provides a fluent API for building expressions. You can chain together method + * calls to create complex expressions. + */ +@BetaApi +public abstract class Expr { + + /** Constructor is package-private to prevent extension. */ + Expr() {} + + private static Expr toExprOrConstant(Object o) { + return o instanceof Expr ? (Expr) o : Constant.of(o); + } + + private static ImmutableList toArrayOfExprOrConstant(Object... others) { + return Arrays.stream(others) + .map(Expr::toExprOrConstant) + .collect(ImmutableList.toImmutableList()); + } + + @InternalApi + abstract Value toProto(); + + // Constants + /** + * Create a constant for a {@link String} value. + * + * @param value The {@link String} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(String value) { + return Constant.of(value); + } + + /** + * Create a constant for a {@link Number} value. + * + * @param value The {@link Number} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(Number value) { + return Constant.of(value); + } + + /** + * Create a constant for a {@link Date} value. + * + * @param value The {@link Date} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(Date value) { + return Constant.of(value); + } + + /** + * Create a constant for a {@link Timestamp} value. + * + * @param value The {@link Timestamp} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(Timestamp value) { + return Constant.of(value); + } + + /** + * Create a constant for a {@link Boolean} value. + * + * @param value The {@link Boolean} value. + * @return A new {@link BooleanExpr} constant instance. + */ + @BetaApi + public static BooleanExpr constant(Boolean value) { + return eq(Constant.of(value), true); + } + + /** + * Create a constant for a {@link GeoPoint} value. + * + * @param value The {@link GeoPoint} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(GeoPoint value) { + return Constant.of(value); + } + + /** + * Create a constant for a {@link Blob} value. + * + * @param value The {@link Blob} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(Blob value) { + return Constant.of(value); + } + + /** + * Create a constant for a {@link DocumentReference} value. + * + * @param value The {@link DocumentReference} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(DocumentReference value) { + return Constant.of(value); + } + + /** + * Create a constant for a bytes value. + * + * @param value The bytes value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(byte[] value) { + return Constant.of(value); + } + + /** + * Create a constant for a {@link VectorValue} value. + * + * @param value The {@link VectorValue} value. + * @return A new {@link Expr} constant instance. + */ + @BetaApi + public static Expr constant(VectorValue value) { + return Constant.of(value); + } + + /** + * Create a {@link Blob} constant from a {@code byte[]}. + * + * @param bytes The {@code byte[]} to convert to a Blob. + * @return A new {@link Expr} constant instance representing the Blob. + */ + @BetaApi + public static Expr blob(byte[] bytes) { + return constant(Blob.fromBytes(bytes)); + } + + /** + * Constant for a null value. + * + * @return An {@link Expr} constant instance. + */ + @BetaApi + public static Expr nullValue() { + return Constant.nullValue(); + } + + /** + * Create a vector constant for a {@code double[]} value. + * + * @param value The {@code double[]} value. + * @return An {@link Expr} constant instance. + */ + @BetaApi + public static Expr vector(double[] value) { + return Constant.vector(value); + } + + /** + * Create a vector constant for a {@link VectorValue} value. + * + * @param value The {@link VectorValue} value. + * @return An {@link Expr} constant instance. + */ + @BetaApi + public static Expr vector(VectorValue value) { + return Constant.of(value); + } + + // Field Reference + /** + * Creates a {@link Field} instance representing the field at the given path. + * + *

The path can be a simple field name (e.g., "name") or a dot-separated path to a nested field + * (e.g., "address.city"). + * + * @param path The path to the field. + * @return A new {@link Field} instance representing the specified path. + */ + @BetaApi + public static Field field(String path) { + return Field.ofUserPath(path); + } + + /** + * Creates a {@link Field} instance representing the field at the given path. + * + *

The path can be a simple field name (e.g., "name") or a dot-separated path to a nested field + * (e.g., "address.city"). + * + * @param fieldPath The {@link FieldPath} to the field. + * @return A new {@link Field} instance representing the specified path. + */ + @BetaApi + public static Field field(FieldPath fieldPath) { + return Field.ofUserPath(fieldPath.toString()); + } + + // Generic Function + /** + * Creates a generic function expression that is not yet implemented. + * + * @param name The name of the generic function. + * @param expr The expressions to be passed as arguments to the function. + * @return A new {@link Expr} representing the generic function. + */ + @BetaApi + public static Expr generic(String name, Expr... expr) { + return new FunctionExpr(name, ImmutableList.copyOf(expr)); + } + + // Logical Operators + /** + * Creates an expression that performs a logical 'AND' operation. + * + * @param condition The first {@link BooleanExpr}. + * @param conditions Additional {@link BooleanExpr}s. + * @return A new {@link BooleanExpr} representing the logical 'AND' operation. + */ + @BetaApi + public static BooleanExpr and(BooleanExpr condition, BooleanExpr... conditions) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(condition); + builder.add(conditions); + return new BooleanExpr("and", builder.build()); + } + + /** + * Creates an expression that performs a logical 'OR' operation. + * + * @param condition The first {@link BooleanExpr}. + * @param conditions Additional {@link BooleanExpr}s. + * @return A new {@link BooleanExpr} representing the logical 'OR' operation. + */ + @BetaApi + public static BooleanExpr or(BooleanExpr condition, BooleanExpr... conditions) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(condition); + builder.add(conditions); + return new BooleanExpr("or", builder.build()); + } + + /** + * Creates an expression that performs a logical 'XOR' operation. + * + * @param condition The first {@link BooleanExpr}. + * @param conditions Additional {@link BooleanExpr}s. + * @return A new {@link BooleanExpr} representing the logical 'XOR' operation. + */ + @BetaApi + public static BooleanExpr xor(BooleanExpr condition, BooleanExpr... conditions) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(condition); + builder.add(conditions); + return new BooleanExpr("xor", builder.build()); + } + + /** + * Creates an expression that negates a boolean expression. + * + * @param condition The boolean expression to negate. + * @return A new {@link BooleanExpr} representing the not operation. + */ + @BetaApi + public static BooleanExpr not(BooleanExpr condition) { + return new BooleanExpr("not", condition); + } + + // Arithmetic Operators + /** + * Creates an expression that adds numeric expressions. + * + * @param first Numeric expression to add. + * @param second Numeric expression to add. + * @return A new {@link Expr} representing the addition operation. + */ + @BetaApi + public static Expr add(Expr first, Expr second) { + return new FunctionExpr("add", ImmutableList.of(first, second)); + } + + /** + * Creates an expression that adds numeric expressions with a constant. + * + * @param first Numeric expression to add. + * @param second Constant to add. + * @return A new {@link Expr} representing the addition operation. + */ + @BetaApi + public static Expr add(Expr first, Number second) { + return add(first, constant(second)); + } + + /** + * Creates an expression that adds a numeric field with a numeric expression. + * + * @param fieldName Numeric field to add. + * @param second Numeric expression to add to field value. + * @return A new {@link Expr} representing the addition operation. + */ + @BetaApi + public static Expr add(String fieldName, Expr second) { + return add(field(fieldName), second); + } + + /** + * Creates an expression that adds a numeric field with constant. + * + * @param fieldName Numeric field to add. + * @param second Constant to add. + * @return A new {@link Expr} representing the addition operation. + */ + @BetaApi + public static Expr add(String fieldName, Number second) { + return add(field(fieldName), constant(second)); + } + + /** + * Creates an expression that subtracts two expressions. + * + * @param minuend Numeric expression to subtract from. + * @param subtrahend Numeric expression to subtract. + * @return A new {@link Expr} representing the subtract operation. + */ + @BetaApi + public static Expr subtract(Expr minuend, Expr subtrahend) { + return new FunctionExpr("subtract", ImmutableList.of(minuend, subtrahend)); + } + + /** + * Creates an expression that subtracts a constant value from a numeric expression. + * + * @param minuend Numeric expression to subtract from. + * @param subtrahend Constant to subtract. + * @return A new {@link Expr} representing the subtract operation. + */ + @BetaApi + public static Expr subtract(Expr minuend, Number subtrahend) { + return subtract(minuend, constant(subtrahend)); + } + + /** + * Creates an expression that subtracts a numeric expressions from numeric field. + * + * @param fieldName Numeric field to subtract from. + * @param subtrahend Numeric expression to subtract. + * @return A new {@link Expr} representing the subtract operation. + */ + @BetaApi + public static Expr subtract(String fieldName, Expr subtrahend) { + return subtract(field(fieldName), subtrahend); + } + + /** + * Creates an expression that subtracts a constant from numeric field. + * + * @param fieldName Numeric field to subtract from. + * @param subtrahend Constant to subtract. + * @return A new {@link Expr} representing the subtract operation. + */ + @BetaApi + public static Expr subtract(String fieldName, Number subtrahend) { + return subtract(field(fieldName), constant(subtrahend)); + } + + /** + * Creates an expression that multiplies numeric expressions. + * + * @param first Numeric expression to multiply. + * @param second Numeric expression to multiply. + * @return A new {@link Expr} representing the multiplication operation. + */ + @BetaApi + public static Expr multiply(Expr first, Expr second) { + return new FunctionExpr("multiply", ImmutableList.of(first, second)); + } + + /** + * Creates an expression that multiplies numeric expressions with a constant. + * + * @param first Numeric expression to multiply. + * @param second Constant to multiply. + * @return A new {@link Expr} representing the multiplication operation. + */ + @BetaApi + public static Expr multiply(Expr first, Number second) { + return multiply(first, constant(second)); + } + + /** + * Creates an expression that multiplies a numeric field with a numeric expression. + * + * @param fieldName Numeric field to multiply. + * @param second Numeric expression to multiply. + * @return A new {@link Expr} representing the multiplication operation. + */ + @BetaApi + public static Expr multiply(String fieldName, Expr second) { + return multiply(field(fieldName), second); + } + + /** + * Creates an expression that multiplies a numeric field with a constant. + * + * @param fieldName Numeric field to multiply. + * @param second Constant to multiply. + * @return A new {@link Expr} representing the multiplication operation. + */ + @BetaApi + public static Expr multiply(String fieldName, Number second) { + return multiply(field(fieldName), constant(second)); + } + + /** + * Creates an expression that divides two numeric expressions. + * + * @param dividend The numeric expression to be divided. + * @param divisor The numeric expression to divide by. + * @return A new {@link Expr} representing the division operation. + */ + @BetaApi + public static Expr divide(Expr dividend, Expr divisor) { + return new FunctionExpr("divide", ImmutableList.of(dividend, divisor)); + } + + /** + * Creates an expression that divides a numeric expression by a constant. + * + * @param dividend The numeric expression to be divided. + * @param divisor The constant to divide by. + * @return A new {@link Expr} representing the division operation. + */ + @BetaApi + public static Expr divide(Expr dividend, Number divisor) { + return divide(dividend, constant(divisor)); + } + + /** + * Creates an expression that divides numeric field by a numeric expression. + * + * @param fieldName The numeric field name to be divided. + * @param divisor The numeric expression to divide by. + * @return A new {@link Expr} representing the divide operation. + */ + @BetaApi + public static Expr divide(String fieldName, Expr divisor) { + return divide(field(fieldName), divisor); + } + + /** + * Creates an expression that divides a numeric field by a constant. + * + * @param fieldName The numeric field name to be divided. + * @param divisor The constant to divide by. + * @return A new {@link Expr} representing the divide operation. + */ + @BetaApi + public static Expr divide(String fieldName, Number divisor) { + return divide(field(fieldName), constant(divisor)); + } + + /** + * Creates an expression that calculates the modulo (remainder) of dividing two numeric + * expressions. + * + * @param dividend The numeric expression to be divided. + * @param divisor The numeric expression to divide by. + * @return A new {@link Expr} representing the modulo operation. + */ + @BetaApi + public static Expr mod(Expr dividend, Expr divisor) { + return new FunctionExpr("mod", ImmutableList.of(dividend, divisor)); + } + + /** + * Creates an expression that calculates the modulo (remainder) of dividing a numeric expression + * by a constant. + * + * @param dividend The numeric expression to be divided. + * @param divisor The constant to divide by. + * @return A new {@link Expr} representing the modulo operation. + */ + @BetaApi + public static Expr mod(Expr dividend, Number divisor) { + return mod(dividend, constant(divisor)); + } + + /** + * Creates an expression that calculates the modulo (remainder) of dividing a numeric field by a + * constant. + * + * @param fieldName The numeric field name to be divided. + * @param divisor The numeric expression to divide by. + * @return A new {@link Expr} representing the modulo operation. + */ + @BetaApi + public static Expr mod(String fieldName, Expr divisor) { + return mod(field(fieldName), divisor); + } + + /** + * Creates an expression that calculates the modulo (remainder) of dividing a numeric field by a + * constant. + * + * @param fieldName The numeric field name to be divided. + * @param divisor The constant to divide by. + * @return A new {@link Expr} representing the modulo operation. + */ + @BetaApi + public static Expr mod(String fieldName, Number divisor) { + return mod(field(fieldName), constant(divisor)); + } + + // Comparison Operators + /** + * Creates an expression that checks if two expressions are equal. + * + * @param left The first expression. + * @param right The second expression. + * @return A new {@link BooleanExpr} representing the equality comparison. + */ + @BetaApi + public static BooleanExpr eq(Expr left, Expr right) { + return new BooleanExpr("eq", left, right); + } + + /** + * Creates an expression that checks if an expression is equal to a constant value. + * + * @param left The expression. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the equality comparison. + */ + @BetaApi + public static BooleanExpr eq(Expr left, Object right) { + return new BooleanExpr("eq", left, toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if a field is equal to an expression. + * + * @param fieldName The field name. + * @param right The expression. + * @return A new {@link BooleanExpr} representing the equality comparison. + */ + @BetaApi + public static BooleanExpr eq(String fieldName, Expr right) { + return eq(field(fieldName), right); + } + + /** + * Creates an expression that checks if a field is equal to a constant value. + * + * @param fieldName The field name. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the equality comparison. + */ + @BetaApi + public static BooleanExpr eq(String fieldName, Object right) { + return eq(field(fieldName), toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if two expressions are not equal. + * + * @param left The first expression. + * @param right The second expression. + * @return A new {@link BooleanExpr} representing the inequality comparison. + */ + @BetaApi + public static BooleanExpr neq(Expr left, Expr right) { + return new BooleanExpr("neq", left, right); + } + + /** + * Creates an expression that checks if an expression is not equal to a constant value. + * + * @param left The expression. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the inequality comparison. + */ + @BetaApi + public static BooleanExpr neq(Expr left, Object right) { + return new BooleanExpr("neq", left, toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if a field is not equal to an expression. + * + * @param fieldName The field name. + * @param right The expression. + * @return A new {@link BooleanExpr} representing the inequality comparison. + */ + @BetaApi + public static BooleanExpr neq(String fieldName, Expr right) { + return neq(field(fieldName), right); + } + + /** + * Creates an expression that checks if a field is not equal to a constant value. + * + * @param fieldName The field name. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the inequality comparison. + */ + @BetaApi + public static BooleanExpr neq(String fieldName, Object right) { + return neq(field(fieldName), toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if the first expression is greater than the second + * expression. + * + * @param left The first expression. + * @param right The second expression. + * @return A new {@link BooleanExpr} representing the greater than comparison. + */ + @BetaApi + public static BooleanExpr gt(Expr left, Expr right) { + return new BooleanExpr("gt", left, right); + } + + /** + * Creates an expression that checks if an expression is greater than a constant value. + * + * @param left The expression. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the greater than comparison. + */ + @BetaApi + public static BooleanExpr gt(Expr left, Object right) { + return new BooleanExpr("gt", left, toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if a field is greater than an expression. + * + * @param fieldName The field name. + * @param right The expression. + * @return A new {@link BooleanExpr} representing the greater than comparison. + */ + @BetaApi + public static BooleanExpr gt(String fieldName, Expr right) { + return gt(field(fieldName), right); + } + + /** + * Creates an expression that checks if a field is greater than a constant value. + * + * @param fieldName The field name. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the greater than comparison. + */ + @BetaApi + public static BooleanExpr gt(String fieldName, Object right) { + return gt(field(fieldName), toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if the first expression is greater than or equal to the + * second expression. + * + * @param left The first expression. + * @param right The second expression. + * @return A new {@link BooleanExpr} representing the greater than or equal to comparison. + */ + @BetaApi + public static BooleanExpr gte(Expr left, Expr right) { + return new BooleanExpr("gte", left, right); + } + + /** + * Creates an expression that checks if an expression is greater than or equal to a constant + * value. + * + * @param left The expression. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the greater than or equal to comparison. + */ + @BetaApi + public static BooleanExpr gte(Expr left, Object right) { + return new BooleanExpr("gte", left, toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if a field is greater than or equal to an expression. + * + * @param fieldName The field name. + * @param right The expression. + * @return A new {@link BooleanExpr} representing the greater than or equal to comparison. + */ + @BetaApi + public static BooleanExpr gte(String fieldName, Expr right) { + return gte(field(fieldName), right); + } + + /** + * Creates an expression that checks if a field is greater than or equal to a constant value. + * + * @param fieldName The field name. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the greater than or equal to comparison. + */ + @BetaApi + public static BooleanExpr gte(String fieldName, Object right) { + return gte(field(fieldName), toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if the first expression is less than the second expression. + * + * @param left The first expression. + * @param right The second expression. + * @return A new {@link BooleanExpr} representing the less than comparison. + */ + @BetaApi + public static BooleanExpr lt(Expr left, Expr right) { + return new BooleanExpr("lt", left, right); + } + + /** + * Creates an expression that checks if an expression is less than a constant value. + * + * @param left The expression. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the less than comparison. + */ + @BetaApi + public static BooleanExpr lt(Expr left, Object right) { + return new BooleanExpr("lt", left, toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if a field is less than an expression. + * + * @param fieldName The field name. + * @param right The expression. + * @return A new {@link BooleanExpr} representing the less than comparison. + */ + @BetaApi + public static BooleanExpr lt(String fieldName, Expr right) { + return lt(field(fieldName), right); + } + + /** + * Creates an expression that checks if a field is less than a constant value. + * + * @param fieldName The field name. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the less than comparison. + */ + @BetaApi + public static BooleanExpr lt(String fieldName, Object right) { + return lt(field(fieldName), toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if the first expression is less than or equal to the second + * expression. + * + * @param left The first expression. + * @param right The second expression. + * @return A new {@link BooleanExpr} representing the less than or equal to comparison. + */ + @BetaApi + public static BooleanExpr lte(Expr left, Expr right) { + return new BooleanExpr("lte", left, right); + } + + /** + * Creates an expression that checks if an expression is less than or equal to a constant value. + * + * @param left The expression. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the less than or equal to comparison. + */ + @BetaApi + public static BooleanExpr lte(Expr left, Object right) { + return new BooleanExpr("lte", left, toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if a field is less than or equal to an expression. + * + * @param fieldName The field name. + * @param right The expression. + * @return A new {@link BooleanExpr} representing the less than or equal to comparison. + */ + @BetaApi + public static BooleanExpr lte(String fieldName, Expr right) { + return lte(field(fieldName), right); + } + + /** + * Creates an expression that checks if a field is less than or equal to a constant value. + * + * @param fieldName The field name. + * @param right The constant value. + * @return A new {@link BooleanExpr} representing the less than or equal to comparison. + */ + @BetaApi + public static BooleanExpr lte(String fieldName, Object right) { + return lte(field(fieldName), toExprOrConstant(right)); + } + + /** + * Creates an expression that checks if an {@code expression}, when evaluated, is equal to any of + * the provided {@code values}. + * + * @param expression The expression whose results to compare. + * @param values The values to check against. + * @return A new {@link BooleanExpr} representing the 'IN' comparison. + */ + @BetaApi + public static BooleanExpr eqAny(Expr expression, List values) { + return new BooleanExpr( + "eq_any", expression, new FunctionExpr("array", toArrayOfExprOrConstant(values.toArray()))); + } + + /** + * Creates an expression that checks if an {@code expression}, when evaluated, is equal to any of + * the elements of {@code arrayExpression}. + * + * @param expression The expression whose results to compare. + * @param arrayExpression An expression that evaluates to an array, whose elements to check for + * equality to the input. + * @return A new {@link BooleanExpr} representing the 'IN' comparison. + */ + @BetaApi + public static BooleanExpr eqAny(Expr expression, Expr arrayExpression) { + return new BooleanExpr("eq_any", expression, arrayExpression); + } + + /** + * Creates an expression that checks if a field's value is equal to any of the provided {@code + * values}. + * + * @param fieldName The field to compare. + * @param values The values to check against. + * @return A new {@link BooleanExpr} representing the 'IN' comparison. + */ + @BetaApi + public static BooleanExpr eqAny(String fieldName, List values) { + return eqAny( + field(fieldName), new FunctionExpr("array", toArrayOfExprOrConstant(values.toArray()))); + } + + /** + * Creates an expression that checks if a field's value is equal to any of the elements of {@code + * arrayExpression}. + * + * @param fieldName The field to compare. + * @param arrayExpression An expression that evaluates to an array, whose elements to check for + * equality to the input. + * @return A new {@link BooleanExpr} representing the 'IN' comparison. + */ + @BetaApi + public static BooleanExpr eqAny(String fieldName, Expr arrayExpression) { + return eqAny(field(fieldName), arrayExpression); + } + + /** + * Creates an expression that checks if an {@code expression}, when evaluated, is not equal to all + * the provided {@code values}. + * + * @param expression The expression whose results to compare. + * @param values The values to check against. + * @return A new {@link BooleanExpr} representing the 'NOT IN' comparison. + */ + @BetaApi + public static BooleanExpr notEqAny(Expr expression, List values) { + return new BooleanExpr( + "not_eq_any", + expression, + new FunctionExpr("array", toArrayOfExprOrConstant(values.toArray()))); + } + + /** + * Creates an expression that checks if an {@code expression}, when evaluated, is not equal to all + * the elements of {@code arrayExpression}. + * + * @param expression The expression whose results to compare. + * @param arrayExpression An expression that evaluates to an array, whose elements to check for + * equality to the input. + * @return A new {@link BooleanExpr} representing the 'NOT IN' comparison. + */ + @BetaApi + public static BooleanExpr notEqAny(Expr expression, Expr arrayExpression) { + return new BooleanExpr("not_eq_any", expression, arrayExpression); + } + + /** + * Creates an expression that checks if a field's value is not equal to all of the provided {@code + * values}. + * + * @param fieldName The field to compare. + * @param values The values to check against. + * @return A new {@link BooleanExpr} representing the 'NOT IN' comparison. + */ + @BetaApi + public static BooleanExpr notEqAny(String fieldName, List values) { + return notEqAny( + field(fieldName), new FunctionExpr("array", toArrayOfExprOrConstant(values.toArray()))); + } + + /** + * Creates an expression that checks if a field's value is not equal to all of the elements of + * {@code arrayExpression}. + * + * @param fieldName The field to compare. + * @param arrayExpression An expression that evaluates to an array, whose elements to check for + * equality to the input. + * @return A new {@link BooleanExpr} representing the 'NOT IN' comparison. + */ + @BetaApi + public static BooleanExpr notEqAny(String fieldName, Expr arrayExpression) { + return notEqAny(field(fieldName), arrayExpression); + } + + // String Functions + /** + * Creates an expression that calculates the character length of a string expression in UTF8. + * + * @param string The expression representing the string. + * @return A new {@link Expr} representing the charLength operation. + */ + @BetaApi + public static Expr charLength(Expr string) { + return new FunctionExpr("char_length", ImmutableList.of(string)); + } + + /** + * Creates an expression that calculates the character length of a string field in UTF8. + * + * @param fieldName The name of the field containing the string. + * @return A new {@link Expr} representing the charLength operation. + */ + @BetaApi + public static Expr charLength(String fieldName) { + return charLength(field(fieldName)); + } + + /** + * Creates an expression that calculates the length of a string in UTF-8 bytes, or just the length + * of a Blob. + * + * @param string The expression representing the string. + * @return A new {@link Expr} representing the length of the string in bytes. + */ + @BetaApi + public static Expr byteLength(Expr string) { + return new FunctionExpr("byte_length", ImmutableList.of(string)); + } + + /** + * Creates an expression that calculates the length of a string represented by a field in UTF-8 + * bytes, or just the length of a Blob. + * + * @param fieldName The name of the field containing the string. + * @return A new {@link Expr} representing the length of the string in bytes. + */ + @BetaApi + public static Expr byteLength(String fieldName) { + return byteLength(field(fieldName)); + } + + /** + * Creates an expression that calculates the length of string, array, map, vector, or Blob. + * + * @param string The expression representing the value to calculate the length of. + * @return A new {@link Expr} representing the length of the value. + */ + @BetaApi + public static Expr length(Expr string) { + return new FunctionExpr("length", ImmutableList.of(string)); + } + + /** + * Creates an expression that calculates the length of string, array, map, vector, or Blob. + * + * @param fieldName The name of the field containing the value. + * @return A new {@link Expr} representing the length of the value. + */ + @BetaApi + public static Expr length(String fieldName) { + return byteLength(field(fieldName)); + } + + /** + * Creates an expression that performs a case-sensitive wildcard string comparison. + * + * @param string The expression representing the string to perform the comparison on. + * @param pattern The pattern to search for. You can use "%" as a wildcard character. + * @return A new {@link BooleanExpr} representing the like operation. + */ + @BetaApi + public static BooleanExpr like(Expr string, Expr pattern) { + return new BooleanExpr("like", string, pattern); + } + + /** + * Creates an expression that performs a case-sensitive wildcard string comparison. + * + * @param string The expression representing the string to perform the comparison on. + * @param pattern The pattern to search for. You can use "%" as a wildcard character. + * @return A new {@link BooleanExpr} representing the like operation. + */ + @BetaApi + public static BooleanExpr like(Expr string, String pattern) { + return like(string, constant(pattern)); + } + + /** + * Creates an expression that performs a case-sensitive wildcard string comparison against a + * field. + * + * @param fieldName The name of the field containing the string. + * @param pattern The pattern to search for. You can use "%" as a wildcard character. + * @return A new {@link BooleanExpr} representing the like comparison. + */ + @BetaApi + public static BooleanExpr like(String fieldName, Expr pattern) { + return like(field(fieldName), pattern); + } + + /** + * Creates an expression that performs a case-sensitive wildcard string comparison against a + * field. + * + * @param fieldName The name of the field containing the string. + * @param pattern The pattern to search for. You can use "%" as a wildcard character. + * @return A new {@link BooleanExpr} representing the like comparison. + */ + @BetaApi + public static BooleanExpr like(String fieldName, String pattern) { + return like(field(fieldName), constant(pattern)); + } + + /** + * Creates an expression that checks if a string expression contains a specified regular + * expression as a substring. + * + * @param string The expression representing the string to perform the comparison on. + * @param pattern The regular expression to use for the search. + * @return A new {@link BooleanExpr} representing the contains regular expression comparison. + */ + @BetaApi + public static BooleanExpr regexContains(Expr string, Expr pattern) { + return new BooleanExpr("regex_contains", string, pattern); + } + + /** + * Creates an expression that checks if a string expression contains a specified regular + * expression as a substring. + * + * @param string The expression representing the string to perform the comparison on. + * @param pattern The regular expression to use for the search. + * @return A new {@link BooleanExpr} representing the contains regular expression comparison. + */ + @BetaApi + public static BooleanExpr regexContains(Expr string, String pattern) { + return regexContains(string, constant(pattern)); + } + + /** + * Creates an expression that checks if a string field contains a specified regular expression as + * a substring. + * + * @param fieldName The name of the field containing the string. + * @param pattern The regular expression to use for the search. + * @return A new {@link BooleanExpr} representing the contains regular expression comparison. + */ + @BetaApi + public static BooleanExpr regexContains(String fieldName, Expr pattern) { + return regexContains(field(fieldName), pattern); + } + + /** + * Creates an expression that checks if a string field contains a specified regular expression as + * a substring. + * + * @param fieldName The name of the field containing the string. + * @param pattern The regular expression to use for the search. + * @return A new {@link BooleanExpr} representing the contains regular expression comparison. + */ + @BetaApi + public static BooleanExpr regexContains(String fieldName, String pattern) { + return regexContains(field(fieldName), constant(pattern)); + } + + /** + * Creates an expression that checks if a string field matches a specified regular expression. + * + * @param string The expression representing the string to match against. + * @param pattern The regular expression to use for the match. + * @return A new {@link BooleanExpr} representing the regular expression match comparison. + */ + @BetaApi + public static BooleanExpr regexMatch(Expr string, Expr pattern) { + return new BooleanExpr("regex_match", string, pattern); + } + + /** + * Creates an expression that checks if a string field matches a specified regular expression. + * + * @param string The expression representing the string to match against. + * @param pattern The regular expression to use for the match. + * @return A new {@link BooleanExpr} representing the regular expression match comparison. + */ + @BetaApi + public static BooleanExpr regexMatch(Expr string, String pattern) { + return regexMatch(string, constant(pattern)); + } + + /** + * Creates an expression that checks if a string field matches a specified regular expression. + * + * @param fieldName The name of the field containing the string. + * @param pattern The regular expression to use for the match. + * @return A new {@link BooleanExpr} representing the regular expression match comparison. + */ + @BetaApi + public static BooleanExpr regexMatch(String fieldName, Expr pattern) { + return regexMatch(field(fieldName), pattern); + } + + /** + * Creates an expression that checks if a string field matches a specified regular expression. + * + * @param fieldName The name of the field containing the string. + * @param pattern The regular expression to use for the match. + * @return A new {@link BooleanExpr} representing the regular expression match comparison. + */ + @BetaApi + public static BooleanExpr regexMatch(String fieldName, String pattern) { + return regexMatch(field(fieldName), constant(pattern)); + } + + /** + * Creates an expression that reverses a string. + * + * @param string An expression evaluating to a string value, which will be reversed. + * @return A new {@link Expr} representing the reversed string. + */ + @BetaApi + public static Expr strReverse(Expr string) { + return new FunctionExpr("str_reverse", ImmutableList.of(string)); + } + + /** + * Creates an expression that reverses a string value from the specified field. + * + * @param fieldName The name of the field that contains the string to reverse. + * @return A new {@link Expr} representing the reversed string. + */ + @BetaApi + public static Expr strReverse(String fieldName) { + return strReverse(field(fieldName)); + } + + /** + * Creates an expression that checks if a string expression contains a specified substring. + * + * @param string The expression representing the string to perform the comparison on. + * @param substring The expression representing the substring to search for. + * @return A new {@link BooleanExpr} representing the contains comparison. + */ + @BetaApi + public static BooleanExpr strContains(Expr string, Expr substring) { + return new BooleanExpr("str_contains", string, substring); + } + + /** + * Creates an expression that checks if a string expression contains a specified substring. + * + * @param string The expression representing the string to perform the comparison on. + * @param substring The substring to search for. + * @return A new {@link BooleanExpr} representing the contains comparison. + */ + @BetaApi + public static BooleanExpr strContains(Expr string, String substring) { + return strContains(string, constant(substring)); + } + + /** + * Creates an expression that checks if a string field contains a specified substring. + * + * @param fieldName The name of the field to perform the comparison on. + * @param substring The expression representing the substring to search for. + * @return A new {@link BooleanExpr} representing the contains comparison. + */ + @BetaApi + public static BooleanExpr strContains(String fieldName, Expr substring) { + return strContains(field(fieldName), substring); + } + + /** + * Creates an expression that checks if a string field contains a specified substring. + * + * @param fieldName The name of the field to perform the comparison on. + * @param substring The substring to search for. + * @return A new {@link BooleanExpr} representing the contains comparison. + */ + @BetaApi + public static BooleanExpr strContains(String fieldName, String substring) { + return strContains(field(fieldName), constant(substring)); + } + + /** + * Creates an expression that checks if a string expression starts with a given {@code prefix}. + * + * @param string The expression to check. + * @param prefix The prefix string expression to check for. + * @return A new {@link BooleanExpr} representing the 'starts with' comparison. + */ + @BetaApi + public static BooleanExpr startsWith(Expr string, Expr prefix) { + return new BooleanExpr("starts_with", string, prefix); + } + + /** + * Creates an expression that checks if a string expression starts with a given {@code prefix}. + * + * @param string The expression to check. + * @param prefix The prefix string to check for. + * @return A new {@link BooleanExpr} representing the 'starts with' comparison. + */ + @BetaApi + public static BooleanExpr startsWith(Expr string, String prefix) { + return startsWith(string, constant(prefix)); + } + + /** + * Creates an expression that checks if a string expression starts with a given {@code prefix}. + * + * @param fieldName The name of field that contains a string to check. + * @param prefix The prefix string expression to check for. + * @return A new {@link BooleanExpr} representing the 'starts with' comparison. + */ + @BetaApi + public static BooleanExpr startsWith(String fieldName, Expr prefix) { + return startsWith(field(fieldName), prefix); + } + + /** + * Creates an expression that checks if a string expression starts with a given {@code prefix}. + * + * @param fieldName The name of field that contains a string to check. + * @param prefix The prefix string to check for. + * @return A new {@link BooleanExpr} representing the 'starts with' comparison. + */ + @BetaApi + public static BooleanExpr startsWith(String fieldName, String prefix) { + return startsWith(field(fieldName), constant(prefix)); + } + + /** + * Creates an expression that checks if a string expression ends with a given {@code suffix}. + * + * @param string The expression to check. + * @param suffix The suffix string expression to check for. + * @return A new {@link BooleanExpr} representing the 'ends with' comparison. + */ + @BetaApi + public static BooleanExpr endsWith(Expr string, Expr suffix) { + return new BooleanExpr("ends_with", string, suffix); + } + + /** + * Creates an expression that checks if a string expression ends with a given {@code suffix}. + * + * @param string The expression to check. + * @param suffix The suffix string to check for. + * @return A new {@link BooleanExpr} representing the 'ends with' comparison. + */ + @BetaApi + public static BooleanExpr endsWith(Expr string, String suffix) { + return endsWith(string, constant(suffix)); + } + + /** + * Creates an expression that checks if a string expression ends with a given {@code suffix}. + * + * @param fieldName The name of field that contains a string to check. + * @param suffix The suffix string expression to check for. + * @return A new {@link BooleanExpr} representing the 'ends with' comparison. + */ + @BetaApi + public static BooleanExpr endsWith(String fieldName, Expr suffix) { + return endsWith(field(fieldName), suffix); + } + + /** + * Creates an expression that checks if a string expression ends with a given {@code suffix}. + * + * @param fieldName The name of field that contains a string to check. + * @param suffix The suffix string to check for. + * @return A new {@link BooleanExpr} representing the 'ends with' comparison. + */ + @BetaApi + public static BooleanExpr endsWith(String fieldName, String suffix) { + return endsWith(field(fieldName), constant(suffix)); + } + + /** + * Creates an expression that returns a substring of the given string. + * + * @param string The expression representing the string to get a substring from. + * @param index The starting index of the substring. + * @param length The length of the substring. + * @return A new {@link Expr} representing the substring. + */ + @BetaApi + public static Expr substring(Expr string, Expr index, Expr length) { + return new FunctionExpr("substr", ImmutableList.of(string, index, length)); + } + + /** + * Creates an expression that returns a substring of the given string. + * + * @param fieldName The name of the field containing the string to get a substring from. + * @param index The starting index of the substring. + * @param length The length of the substring. + * @return A new {@link Expr} representing the substring. + */ + @BetaApi + public static Expr substring(String fieldName, int index, int length) { + return substring(field(fieldName), constant(index), constant(length)); + } + + /** + * Creates an expression that converts a string expression to lowercase. + * + * @param string The expression representing the string to convert to lowercase. + * @return A new {@link Expr} representing the lowercase string. + */ + @BetaApi + public static Expr toLower(Expr string) { + return new FunctionExpr("to_lower", ImmutableList.of(string)); + } + + /** + * Creates an expression that converts a string field to lowercase. + * + * @param fieldName The name of the field containing the string to convert to lowercase. + * @return A new {@link Expr} representing the lowercase string. + */ + @BetaApi + public static Expr toLower(String fieldName) { + return toLower(field(fieldName)); + } + + /** + * Creates an expression that converts a string expression to uppercase. + * + * @param string The expression representing the string to convert to uppercase. + * @return A new {@link Expr} representing the lowercase string. + */ + @BetaApi + public static Expr toUpper(Expr string) { + return new FunctionExpr("to_upper", ImmutableList.of(string)); + } + + /** + * Creates an expression that converts a string field to uppercase. + * + * @param fieldName The name of the field containing the string to convert to uppercase. + * @return A new {@link Expr} representing the lowercase string. + */ + @BetaApi + public static Expr toUpper(String fieldName) { + return toUpper(field(fieldName)); + } + + /** + * Creates an expression that removes leading and trailing whitespace from a string expression. + * + * @param string The expression representing the string to trim. + * @return A new {@link Expr} representing the trimmed string. + */ + @BetaApi + public static Expr trim(Expr string) { + return new FunctionExpr("trim", ImmutableList.of(string)); + } + + /** + * Creates an expression that removes leading and trailing whitespace from a string field. + * + * @param fieldName The name of the field containing the string to trim. + * @return A new {@link Expr} representing the trimmed string. + */ + @BetaApi + public static Expr trim(String fieldName) { + return trim(field(fieldName)); + } + + /** + * Creates an expression that concatenates string expressions together. + * + * @param firstString The expression representing the initial string value. + * @param otherStrings Optional additional string expressions or string constants to concatenate. + * @return A new {@link Expr} representing the concatenated string. + */ + @BetaApi + public static Expr strConcat(Expr firstString, Object... otherStrings) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(firstString); + builder.addAll(toArrayOfExprOrConstant(otherStrings)); + return new FunctionExpr("str_concat", builder.build()); + } + + /** + * Creates an expression that concatenates string expressions together. + * + * @param fieldName The field name containing the initial string value. + * @param otherStrings Optional additional string expressions or string constants to concatenate. + * @return A new {@link Expr} representing the concatenated string. + */ + @BetaApi + public static Expr strConcat(String fieldName, Object... otherStrings) { + return strConcat(field(fieldName), otherStrings); + } + + // Map Functions + /** + * Creates an expression that creates a Firestore map value from an input object. + * + * @param elements The input map to evaluate in the expression. + * @return A new {@link Expr} representing the map function. + */ + @BetaApi + public static Expr map(Map elements) { + ImmutableList params = + elements.entrySet().stream() + .flatMap( + e -> Arrays.asList(constant(e.getKey()), toExprOrConstant(e.getValue())).stream()) + .collect(ImmutableList.toImmutableList()); + return new FunctionExpr("map", params); + } + + /** + * Accesses a value from a map (object) field using the provided {@code keyExpression}. + * + * @param map The expression representing the map. + * @param key The key to access in the map. + * @return A new {@link Expr} representing the value associated with the given key in the map. + */ + @BetaApi + public static Expr mapGet(Expr map, Expr key) { + return new FunctionExpr("map_get", ImmutableList.of(map, key)); + } + + /** + * Accesses a value from a map (object) field using the provided {@code key}. + * + * @param map The expression representing the map. + * @param key The key to access in the map. + * @return A new {@link Expr} representing the value associated with the given key in the map. + */ + @BetaApi + public static Expr mapGet(Expr map, String key) { + return mapGet(map, constant(key)); + } + + /** + * Accesses a value from a map (object) field using the provided {@code key}. + * + * @param fieldName The field name of the map field. + * @param key The key to access in the map. + * @return A new {@link Expr} representing the value associated with the given key in the map. + */ + @BetaApi + public static Expr mapGet(String fieldName, String key) { + return mapGet(field(fieldName), constant(key)); + } + + /** + * Accesses a value from a map (object) field using the provided {@code keyExpression}. + * + * @param fieldName The field name of the map field. + * @param key The key to access in the map. + * @return A new {@link Expr} representing the value associated with the given key in the map. + */ + @BetaApi + public static Expr mapGet(String fieldName, Expr key) { + return mapGet(field(fieldName), key); + } + + @BetaApi + public static Expr mapMerge(Expr firstMap, Expr secondMap) { + return mapMerge(firstMap, secondMap, new Expr[0]); + } + + @BetaApi + public static Expr mapMerge(String firstMapFieldName, Expr secondMap) { + return mapMerge(field(firstMapFieldName), secondMap, new Expr[0]); + } + + /** + * Creates an expression that merges multiple maps into a single map. If multiple maps have the + * same key, the later value is used. + * + * @param firstMap First map expression that will be merged. + * @param secondMap Second map expression that will be merged. + * @param otherMaps Additional maps to merge. + * @return A new {@link Expr} representing the mapMerge operation. + */ + @BetaApi + public static Expr mapMerge(Expr firstMap, Expr secondMap, Expr... otherMaps) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(firstMap); + builder.add(secondMap); + builder.add(otherMaps); + return new FunctionExpr("map_merge", builder.build()); + } + + /** + * Creates an expression that merges multiple maps into a single map. If multiple maps have the + * same key, the later value is used. + * + * @param firstMapFieldName Field name of the first map expression that will be merged. + * @param secondMap Second map expression that will be merged. + * @param otherMaps Additional maps to merge. + * @return A new {@link Expr} representing the mapMerge operation. + */ + @BetaApi + public static Expr mapMerge(String firstMapFieldName, Expr secondMap, Expr... otherMaps) { + return mapMerge(field(firstMapFieldName), secondMap, otherMaps); + } + + /** + * Creates an expression that removes a key from a map. + * + * @param mapExpr The expression representing the map. + * @param key The key to remove from the map. + * @return A new {@link Expr} representing the map with the key removed. + */ + @BetaApi + public static Expr mapRemove(Expr mapExpr, Expr key) { + return new FunctionExpr("map_remove", ImmutableList.of(mapExpr, key)); + } + + /** + * Creates an expression that removes a key from a map. + * + * @param mapField The field name of the map. + * @param key The key to remove from the map. + * @return A new {@link Expr} representing the map with the key removed. + */ + @BetaApi + public static Expr mapRemove(String mapField, Expr key) { + return mapRemove(field(mapField), key); + } + + /** + * Creates an expression that removes a key from a map. + * + * @param mapExpr The expression representing the map. + * @param key The key to remove from the map. + * @return A new {@link Expr} representing the map with the key removed. + */ + @BetaApi + public static Expr mapRemove(Expr mapExpr, String key) { + return mapRemove(mapExpr, constant(key)); + } + + /** + * Creates an expression that removes a key from a map. + * + * @param mapField The field name of the map. + * @param key The key to remove from the map. + * @return A new {@link Expr} representing the map with the key removed. + */ + @BetaApi + public static Expr mapRemove(String mapField, String key) { + return mapRemove(field(mapField), key); + } + + // Array Functions + /** + * Creates an expression that creates a Firestore array value from an input object. + * + * @param elements The input elements to evaluate in the expression. + * @return A new {@link Expr} representing the array function. + */ + @BetaApi + public static Expr array(Object... elements) { + return new FunctionExpr("array", toArrayOfExprOrConstant(elements)); + } + + /** + * Creates an expression that creates a Firestore array value from an input object. + * + * @param elements The input elements to evaluate in the expression. + * @return A new {@link Expr} representing the array function. + */ + @BetaApi + public static Expr array(List elements) { + return new FunctionExpr("array", toArrayOfExprOrConstant(elements.toArray())); + } + + /** + * Creates an expression that concatenates multiple arrays into a single array. + * + * @param firstArray The first array expression to concatenate. + * @param otherArrays Additional arrays to concatenate. + * @return A new {@link Expr} representing the concatenated array. + */ + @BetaApi + public static Expr arrayConcat(Expr firstArray, Object... otherArrays) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(firstArray); + builder.addAll(toArrayOfExprOrConstant(otherArrays)); + return new FunctionExpr("array_concat", builder.build()); + } + + /** + * Creates an expression that concatenates multiple arrays into a single array. + * + * @param firstArrayField The field name of the first array to concatenate. + * @param otherArrays Additional arrays to concatenate. + * @return A new {@link Expr} representing the concatenated array. + */ + @BetaApi + public static Expr arrayConcat(String firstArrayField, Object... otherArrays) { + return arrayConcat(field(firstArrayField), otherArrays); + } + + /** + * Creates an expression that reverses an array. + * + * @param array The expression representing the array to reverse. + * @return A new {@link Expr} representing the reversed array. + */ + @BetaApi + public static Expr arrayReverse(Expr array) { + return new FunctionExpr("array_reverse", ImmutableList.of(array)); + } + + /** + * Creates an expression that reverses an array. + * + * @param arrayFieldName The field name of the array to reverse. + * @return A new {@link Expr} representing the reversed array. + */ + @BetaApi + public static Expr arrayReverse(String arrayFieldName) { + return arrayReverse(field(arrayFieldName)); + } + + /** + * Creates an expression that checks if an array contains a specified element. + * + * @param array The expression representing the array. + * @param element The element to check for. + * @return A new {@link BooleanExpr} representing the array contains comparison. + */ + @BetaApi + public static BooleanExpr arrayContains(Expr array, Expr element) { + return new BooleanExpr("array_contains", array, element); + } + + /** + * Creates an expression that checks if an array contains a specified element. + * + * @param arrayFieldName The field name of the array. + * @param element The element to check for. + * @return A new {@link BooleanExpr} representing the array contains comparison. + */ + @BetaApi + public static BooleanExpr arrayContains(String arrayFieldName, Expr element) { + return arrayContains(field(arrayFieldName), element); + } + + /** + * Creates an expression that checks if an array contains a specified element. + * + * @param array The expression representing the array. + * @param element The element to check for. + * @return A new {@link BooleanExpr} representing the array contains comparison. + */ + @BetaApi + public static BooleanExpr arrayContains(Expr array, Object element) { + return arrayContains(array, toExprOrConstant(element)); + } + + /** + * Creates an expression that checks if an array contains a specified element. + * + * @param arrayFieldName The field name of the array. + * @param element The element to check for. + * @return A new {@link BooleanExpr} representing the array contains comparison. + */ + @BetaApi + public static BooleanExpr arrayContains(String arrayFieldName, Object element) { + return arrayContains(field(arrayFieldName), toExprOrConstant(element)); + } + + /** + * Creates an expression that checks if an array contains all of the provided values. + * + * @param array The expression representing the array. + * @param values The values to check for. + * @return A new {@link BooleanExpr} representing the array contains all comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAll(Expr array, List values) { + return arrayContainsAll(array, array(values)); + } + + /** + * Creates an expression that checks if an array contains all of the elements of another array. + * + * @param array The expression representing the array. + * @param arrayExpression The expression representing the array of values to check for. + * @return A new {@link BooleanExpr} representing the array contains all comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAll(Expr array, Expr arrayExpression) { + return new BooleanExpr("array_contains_all", array, arrayExpression); + } + + /** + * Creates an expression that checks if an array contains all of the provided values. + * + * @param arrayFieldName The field name of the array. + * @param values The values to check for. + * @return A new {@link BooleanExpr} representing the array contains all comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAll(String arrayFieldName, List values) { + return arrayContainsAll(field(arrayFieldName), array(values)); + } + + /** + * Creates an expression that checks if an array contains all of the elements of another array. + * + * @param arrayFieldName The field name of the array. + * @param arrayExpression The expression representing the array of values to check for. + * @return A new {@link BooleanExpr} representing the array contains all comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAll(String arrayFieldName, Expr arrayExpression) { + return arrayContainsAll(field(arrayFieldName), arrayExpression); + } + + /** + * Creates an expression that checks if an array contains any of the provided values. + * + * @param array The expression representing the array. + * @param values The values to check for. + * @return A new {@link BooleanExpr} representing the array contains any comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAny(Expr array, List values) { + return new BooleanExpr("array_contains_any", array, array(values)); + } + + /** + * Creates an expression that checks if an array contains any of the elements of another array. + * + * @param array The expression representing the array. + * @param arrayExpression The expression representing the array of values to check for. + * @return A new {@link BooleanExpr} representing the array contains any comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAny(Expr array, Expr arrayExpression) { + return new BooleanExpr("array_contains_any", array, arrayExpression); + } + + /** + * Creates an expression that checks if an array contains any of the provided values. + * + * @param arrayFieldName The field name of the array. + * @param values The values to check for. + * @return A new {@link BooleanExpr} representing the array contains any comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAny(String arrayFieldName, List values) { + return arrayContainsAny(field(arrayFieldName), array(values)); + } + + /** + * Creates an expression that checks if an array contains any of the elements of another array. + * + * @param arrayFieldName The field name of the array. + * @param arrayExpression The expression representing the array of values to check for. + * @return A new {@link BooleanExpr} representing the array contains any comparison. + */ + @BetaApi + public static BooleanExpr arrayContainsAny(String arrayFieldName, Expr arrayExpression) { + return arrayContainsAny(field(arrayFieldName), arrayExpression); + } + + /** + * Creates an expression that returns the length of an array. + * + * @param array The expression representing the array. + * @return A new {@link Expr} representing the length of the array. + */ + @BetaApi + public static Expr arrayLength(Expr array) { + return new FunctionExpr("array_length", ImmutableList.of(array)); + } + + /** + * Creates an expression that returns the length of an array. + * + * @param arrayFieldName The field name of the array. + * @return A new {@link Expr} representing the length of the array. + */ + @BetaApi + public static Expr arrayLength(String arrayFieldName) { + return arrayLength(field(arrayFieldName)); + } + + /** + * Creates an expression that returns an element from an array at a specified index. + * + * @param array The expression representing the array. + * @param offset The index of the element to return. + * @return A new {@link Expr} representing the element at the specified index. + */ + @BetaApi + public static Expr arrayGet(Expr array, Expr offset) { + return new FunctionExpr("array_get", ImmutableList.of(array, offset)); + } + + /** + * Creates an expression that returns an element from an array at a specified index. + * + * @param array The expression representing the array. + * @param offset The index of the element to return. + * @return A new {@link Expr} representing the element at the specified index. + */ + @BetaApi + public static Expr arrayGet(Expr array, int offset) { + return arrayGet(array, constant(offset)); + } + + /** + * Creates an expression that returns an element from an array at a specified index. + * + * @param arrayFieldName The field name of the array. + * @param offset The index of the element to return. + * @return A new {@link Expr} representing the element at the specified index. + */ + @BetaApi + public static Expr arrayGet(String arrayFieldName, Expr offset) { + return arrayGet(field(arrayFieldName), offset); + } + + /** + * Creates an expression that returns an element from an array at a specified index. + * + * @param arrayFieldName The field name of the array. + * @param offset The index of the element to return. + * @return A new {@link Expr} representing the element at the specified index. + */ + @BetaApi + public static Expr arrayGet(String arrayFieldName, int offset) { + return arrayGet(field(arrayFieldName), constant(offset)); + } + + // Vector Functions + /** + * Creates an expression that calculates the cosine distance between two vectors. + * + * @param vector1 The first vector. + * @param vector2 The second vector. + * @return A new {@link Expr} representing the cosine distance. + */ + @BetaApi + public static Expr cosineDistance(Expr vector1, Expr vector2) { + return new FunctionExpr("cosine_distance", ImmutableList.of(vector1, vector2)); + } + + /** + * Creates an expression that calculates the cosine distance between two vectors. + * + * @param vector1 The first vector. + * @param vector2 The second vector. + * @return A new {@link Expr} representing the cosine distance. + */ + @BetaApi + public static Expr cosineDistance(Expr vector1, double[] vector2) { + return cosineDistance(vector1, vector(vector2)); + } + + /** + * Creates an expression that calculates the cosine distance between two vectors. + * + * @param vectorFieldName The field name of the first vector. + * @param vector The second vector. + * @return A new {@link Expr} representing the cosine distance. + */ + @BetaApi + public static Expr cosineDistance(String vectorFieldName, Expr vector) { + return cosineDistance(field(vectorFieldName), vector); + } + + /** + * Creates an expression that calculates the cosine distance between two vectors. + * + * @param vectorFieldName The field name of the first vector. + * @param vector The second vector. + * @return A new {@link Expr} representing the cosine distance. + */ + @BetaApi + public static Expr cosineDistance(String vectorFieldName, double[] vector) { + return cosineDistance(field(vectorFieldName), vector(vector)); + } + + /** + * Creates an expression that calculates the dot product of two vectors. + * + * @param vector1 The first vector. + * @param vector2 The second vector. + * @return A new {@link Expr} representing the dot product. + */ + @BetaApi + public static Expr dotProduct(Expr vector1, Expr vector2) { + return new FunctionExpr("dot_product", ImmutableList.of(vector1, vector2)); + } + + /** + * Creates an expression that calculates the dot product of two vectors. + * + * @param vector1 The first vector. + * @param vector2 The second vector. + * @return A new {@link Expr} representing the dot product. + */ + @BetaApi + public static Expr dotProduct(Expr vector1, double[] vector2) { + return dotProduct(vector1, vector(vector2)); + } + + /** + * Creates an expression that calculates the dot product of two vectors. + * + * @param vectorFieldName The field name of the first vector. + * @param vector The second vector. + * @return A new {@link Expr} representing the dot product. + */ + @BetaApi + public static Expr dotProduct(String vectorFieldName, Expr vector) { + return dotProduct(field(vectorFieldName), vector); + } + + /** + * Creates an expression that calculates the dot product of two vectors. + * + * @param vectorFieldName The field name of the first vector. + * @param vector The second vector. + * @return A new {@link Expr} representing the dot product. + */ + @BetaApi + public static Expr dotProduct(String vectorFieldName, double[] vector) { + return dotProduct(field(vectorFieldName), vector(vector)); + } + + /** + * Creates an expression that calculates the Euclidean distance between two vectors. + * + * @param vector1 The first vector. + * @param vector2 The second vector. + * @return A new {@link Expr} representing the Euclidean distance. + */ + @BetaApi + public static Expr euclideanDistance(Expr vector1, Expr vector2) { + return new FunctionExpr("euclidean_distance", ImmutableList.of(vector1, vector2)); + } + + /** + * Creates an expression that calculates the Euclidean distance between two vectors. + * + * @param vector1 The first vector. + * @param vector2 The second vector. + * @return A new {@link Expr} representing the Euclidean distance. + */ + @BetaApi + public static Expr euclideanDistance(Expr vector1, double[] vector2) { + return euclideanDistance(vector1, vector(vector2)); + } + + /** + * Creates an expression that calculates the Euclidean distance between two vectors. + * + * @param vectorFieldName The field name of the first vector. + * @param vector The second vector. + * @return A new {@link Expr} representing the Euclidean distance. + */ + @BetaApi + public static Expr euclideanDistance(String vectorFieldName, Expr vector) { + return euclideanDistance(field(vectorFieldName), vector); + } + + /** + * Creates an expression that calculates the Euclidean distance between two vectors. + * + * @param vectorFieldName The field name of the first vector. + * @param vector The second vector. + * @return A new {@link Expr} representing the Euclidean distance. + */ + @BetaApi + public static Expr euclideanDistance(String vectorFieldName, double[] vector) { + return euclideanDistance(field(vectorFieldName), vector(vector)); + } + + /** + * Creates an expression that calculates the length of a vector. + * + * @param vectorExpression The expression representing the vector. + * @return A new {@link Expr} representing the length of the vector. + */ + @BetaApi + public static Expr vectorLength(Expr vectorExpression) { + return new FunctionExpr("vector_length", ImmutableList.of(vectorExpression)); + } + + /** + * Creates an expression that calculates the length of a vector. + * + * @param fieldName The field name of the vector. + * @return A new {@link Expr} representing the length of the vector. + */ + @BetaApi + public static Expr vectorLength(String fieldName) { + return vectorLength(field(fieldName)); + } + + // Timestamp Functions + /** + * Creates an expression that converts a Unix timestamp in microseconds to a Firestore timestamp. + * + * @param expr The expression representing the Unix timestamp in microseconds. + * @return A new {@link Expr} representing the Firestore timestamp. + */ + @BetaApi + public static Expr unixMicrosToTimestamp(Expr expr) { + return new FunctionExpr("unix_micros_to_timestamp", ImmutableList.of(expr)); + } + + /** + * Creates an expression that interprets a field's value as the number of microseconds since the + * Unix epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @param fieldName The name of the field containing the number of microseconds since epoch. + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public static Expr unixMicrosToTimestamp(String fieldName) { + return unixMicrosToTimestamp(field(fieldName)); + } + + /** + * Creates an expression that converts a timestamp expression to the number of microseconds since + * the Unix epoch (1970-01-01 00:00:00 UTC). + * + * @param expr The expression representing the timestamp. + * @return A new {@link Expr} representing the number of microseconds since epoch. + */ + @BetaApi + public static Expr timestampToUnixMicros(Expr expr) { + return new FunctionExpr("timestamp_to_unix_micros", ImmutableList.of(expr)); + } + + /** + * Creates an expression that converts a timestamp field to the number of microseconds since the + * Unix epoch (1970-01-01 00:00:00 UTC). + * + * @param fieldName The name of the field that contains the timestamp. + * @return A new {@link Expr} representing the number of microseconds since epoch. + */ + @BetaApi + public static Expr timestampToUnixMicros(String fieldName) { + return timestampToUnixMicros(field(fieldName)); + } + + /** + * Creates an expression that interprets an expression as the number of milliseconds since the + * Unix epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @param expr The expression representing the number of milliseconds since epoch. + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public static Expr unixMillisToTimestamp(Expr expr) { + return new FunctionExpr("unix_millis_to_timestamp", ImmutableList.of(expr)); + } + + /** + * Creates an expression that interprets a field's value as the number of milliseconds since the + * Unix epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @param fieldName The name of the field containing the number of milliseconds since epoch. + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public static Expr unixMillisToTimestamp(String fieldName) { + return unixMillisToTimestamp(field(fieldName)); + } + + /** + * Creates an expression that converts a timestamp expression to the number of milliseconds since + * the Unix epoch (1970-01-01 00:00:00 UTC). + * + * @param expr The expression representing the timestamp. + * @return A new {@link Expr} representing the number of milliseconds since epoch. + */ + @BetaApi + public static Expr timestampToUnixMillis(Expr expr) { + return new FunctionExpr("timestamp_to_unix_millis", ImmutableList.of(expr)); + } + + /** + * Creates an expression that converts a timestamp field to the number of milliseconds since the + * Unix epoch (1970-01-01 00:00:00 UTC). + * + * @param fieldName The name of the field that contains the timestamp. + * @return A new {@link Expr} representing the number of milliseconds since epoch. + */ + @BetaApi + public static Expr timestampToUnixMillis(String fieldName) { + return timestampToUnixMillis(field(fieldName)); + } + + /** + * Creates an expression that interprets an expression as the number of seconds since the Unix + * epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @param expr The expression representing the number of seconds since epoch. + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public static Expr unixSecondsToTimestamp(Expr expr) { + return new FunctionExpr("unix_seconds_to_timestamp", ImmutableList.of(expr)); + } + + /** + * Creates an expression that interprets a field's value as the number of seconds since the Unix + * epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @param fieldName The name of the field containing the number of seconds since epoch. + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public static Expr unixSecondsToTimestamp(String fieldName) { + return unixSecondsToTimestamp(field(fieldName)); + } + + /** + * Creates an expression that converts a timestamp expression to the number of seconds since the + * Unix epoch (1970-01-01 00:00:00 UTC). + * + * @param expr The expression representing the timestamp. + * @return A new {@link Expr} representing the number of seconds since epoch. + */ + @BetaApi + public static Expr timestampToUnixSeconds(Expr expr) { + return new FunctionExpr("timestamp_to_unix_seconds", ImmutableList.of(expr)); + } + + /** + * Creates an expression that converts a timestamp field to the number of seconds since the Unix + * epoch (1970-01-01 00:00:00 UTC). + * + * @param fieldName The name of the field that contains the timestamp. + * @return A new {@link Expr} representing the number of seconds since epoch. + */ + @BetaApi + public static Expr timestampToUnixSeconds(String fieldName) { + return timestampToUnixSeconds(field(fieldName)); + } + + /** + * Creates an expression that adds a specified amount of time to a timestamp. + * + * @param timestamp The expression representing the timestamp. + * @param unit The expression representing the unit of time to add. Valid units include + * "microsecond", "millisecond", "second", "minute", "hour" and "day". + * @param amount The expression representing the amount of time to add. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampAdd(Expr timestamp, Expr unit, Expr amount) { + return new FunctionExpr("timestamp_add", ImmutableList.of(timestamp, unit, amount)); + } + + /** + * Creates an expression that adds a specified amount of time to a timestamp. + * + * @param timestamp The expression representing the timestamp. + * @param unit The unit of time to add. Valid units include "microsecond", "millisecond", + * "second", "minute", "hour" and "day". + * @param amount The amount of time to add. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampAdd(Expr timestamp, String unit, long amount) { + return timestampAdd(timestamp, constant(unit), constant(amount)); + } + + /** + * Creates an expression that adds a specified amount of time to a timestamp. + * + * @param fieldName The name of the field that contains the timestamp. + * @param unit The expression representing the unit of time to add. Valid units include + * "microsecond", "millisecond", "second", "minute", "hour" and "day". + * @param amount The expression representing the amount of time to add. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampAdd(String fieldName, Expr unit, Expr amount) { + return timestampAdd(field(fieldName), unit, amount); + } + + /** + * Creates an expression that adds a specified amount of time to a timestamp. + * + * @param fieldName The name of the field that contains the timestamp. + * @param unit The unit of time to add. Valid units include "microsecond", "millisecond", + * "second", "minute", "hour" and "day". + * @param amount The amount of time to add. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampAdd(String fieldName, String unit, long amount) { + return timestampAdd(field(fieldName), constant(unit), constant(amount)); + } + + /** + * Creates an expression that subtracts a specified amount of time to a timestamp. + * + * @param timestamp The expression representing the timestamp. + * @param unit The expression representing the unit of time to subtract. Valid units include + * "microsecond", "millisecond", "second", "minute", "hour" and "day". + * @param amount The expression representing the amount of time to subtract. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampSub(Expr timestamp, Expr unit, Expr amount) { + return new FunctionExpr("timestamp_sub", ImmutableList.of(timestamp, unit, amount)); + } + + /** + * Creates an expression that subtracts a specified amount of time to a timestamp. + * + * @param timestamp The expression representing the timestamp. + * @param unit The unit of time to subtract. Valid units include "microsecond", "millisecond", + * "second", "minute", "hour" and "day". + * @param amount The amount of time to subtract. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampSub(Expr timestamp, String unit, long amount) { + return timestampSub(timestamp, constant(unit), constant(amount)); + } + + /** + * Creates an expression that subtracts a specified amount of time to a timestamp. + * + * @param fieldName The name of the field that contains the timestamp. + * @param unit The unit of time to subtract. Valid units include "microsecond", "millisecond", + * "second", "minute", "hour" and "day". + * @param amount The amount of time to subtract. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampSub(String fieldName, Expr unit, Expr amount) { + return timestampSub(field(fieldName), unit, amount); + } + + /** + * Creates an expression that subtracts a specified amount of time to a timestamp. + * + * @param fieldName The name of the field that contains the timestamp. + * @param unit The unit of time to subtract. Valid units include "microsecond", "millisecond", + * "second", "minute", "hour" and "day". + * @param amount The amount of time to subtract. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public static Expr timestampSub(String fieldName, String unit, long amount) { + return timestampSub(field(fieldName), constant(unit), constant(amount)); + } + + // Conditional Functions + /** + * Creates a conditional expression that evaluates to a {@code thenExpr} expression if a condition + * is true or an {@code elseExpr} expression if the condition is false. + * + * @param condition The condition to evaluate. + * @param thenExpr The expression to evaluate if the condition is true. + * @param elseExpr The expression to evaluate if the condition is false. + * @return A new {@link Expr} representing the conditional operation. + */ + @BetaApi + public static Expr cond(BooleanExpr condition, Expr thenExpr, Expr elseExpr) { + return new FunctionExpr("cond", ImmutableList.of(condition, thenExpr, elseExpr)); + } + + /** + * Creates a conditional expression that evaluates to a {@code thenValue} if a condition is true + * or an {@code elseValue} if the condition is false. + * + * @param condition The condition to evaluate. + * @param thenValue Value if the condition is true. + * @param elseValue Value if the condition is false. + * @return A new {@link Expr} representing the conditional operation. + */ + @BetaApi + public static Expr cond(BooleanExpr condition, Object thenValue, Object elseValue) { + return cond(condition, toExprOrConstant(thenValue), toExprOrConstant(elseValue)); + } + + // Error Handling Functions + /** + * Creates an expression that returns the {@code catchExpr} argument if there is an error, else + * return the result of the {@code tryExpr} argument evaluation. + * + * @param tryExpr The try expression. + * @param catchExpr The catch expression that will be evaluated and returned if the {@code + * tryExpr} produces an error. + * @return A new {@link Expr} representing the ifError operation. + */ + @BetaApi + public static Expr ifError(Expr tryExpr, Expr catchExpr) { + return new FunctionExpr("if_error", ImmutableList.of(tryExpr, catchExpr)); + } + + /** + * Creates an expression that returns the {@code catchExpr} argument if there is an error, else + * return the result of the {@code tryExpr} argument evaluation. + * + *

This overload will return {@link BooleanExpr} when both parameters are also {@link + * BooleanExpr}. + * + * @param tryExpr The try boolean expression. + * @param catchExpr The catch boolean expression that will be evaluated and returned if the {@code + * tryExpr} produces an error. + * @return A new {@link BooleanExpr} representing the ifError operation. + */ + @BetaApi + public static BooleanExpr ifError(BooleanExpr tryExpr, BooleanExpr catchExpr) { + return new BooleanExpr("if_error", tryExpr, catchExpr); + } + + /** + * Creates an expression that returns the {@code catchValue} argument if there is an error, else + * return the result of the {@code tryExpr} argument evaluation. + * + * @param tryExpr The try expression. + * @param catchValue The value that will be returned if the {@code tryExpr} produces an error. + * @return A new {@link Expr} representing the ifError operation. + */ + @BetaApi + public static Expr ifError(Expr tryExpr, Object catchValue) { + return ifError(tryExpr, toExprOrConstant(catchValue)); + } + + /** + * Creates an expression that checks if a given expression produces an error. + * + * @param expr The expression to check. + * @return A new {@link BooleanExpr} representing the `isError` check. + */ + @BetaApi + public static BooleanExpr isError(Expr expr) { + return new BooleanExpr("is_error", expr); + } + + // Other Utility Functions + /** + * Creates an expression that returns the document ID from a path. + * + * @param documentPath An expression the evaluates to document path. + * @return A new {@link Expr} representing the documentId operation. + */ + @BetaApi + public static Expr documentId(Expr documentPath) { + return new FunctionExpr("document_id", ImmutableList.of(documentPath)); + } + + /** + * Creates an expression that returns the document ID from a path. + * + * @param documentPath The string representation of the document path. + * @return A new {@link Expr} representing the documentId operation. + */ + @BetaApi + public static Expr documentId(String documentPath) { + return documentId(constant(documentPath)); + } + + /** + * Creates an expression that returns the document ID from a {@link DocumentReference}. + * + * @param docRef The {@link DocumentReference}. + * @return A new {@link Expr} representing the documentId operation. + */ + @BetaApi + public static Expr documentId(DocumentReference docRef) { + return documentId(constant(docRef)); + } + + /** + * Creates an expression that returns the collection ID from a path. + * + * @param path An expression the evaluates to document path. + * @return A new {@link Expr} representing the collectionId operation. + */ + @BetaApi + public static Expr collectionId(Expr path) { + return new FunctionExpr("collection_id", ImmutableList.of(path)); + } + + /** + * Creates an expression that returns the collection ID from a path. + * + * @param pathFieldName The field name of the path. + * @return A new {@link Expr} representing the collectionId operation. + */ + @BetaApi + public static Expr collectionId(String pathFieldName) { + return collectionId(field(pathFieldName)); + } + + // Type Checking Functions + /** + * Creates an expression that checks if a field exists. + * + * @param value An expression evaluates to the name of the field to check. + * @return A new {@link Expr} representing the exists check. + */ + @BetaApi + public static BooleanExpr exists(Expr value) { + return new BooleanExpr("exists", value); + } + + /** + * Creates an expression that checks if a field exists. + * + * @param fieldName The field name to check. + * @return A new {@link Expr} representing the exists check. + */ + @BetaApi + public static BooleanExpr exists(String fieldName) { + return exists(field(fieldName)); + } + + /** + * Creates an expression that returns true if a value is absent. Otherwise, returns false even if + * the value is null. + * + * @param value The expression to check. + * @return A new {@link BooleanExpr} representing the isAbsent operation. + */ + @BetaApi + public static BooleanExpr isAbsent(Expr value) { + return new BooleanExpr("is_absent", value); + } + + /** + * Creates an expression that returns true if a field is absent. Otherwise, returns false even if + * the field value is null. + * + * @param fieldName The field to check. + * @return A new {@link BooleanExpr} representing the isAbsent operation. + */ + @BetaApi + public static BooleanExpr isAbsent(String fieldName) { + return isAbsent(field(fieldName)); + } + + /** + * Creates an expression that checks if an expression evaluates to 'NaN' (Not a Number). + * + * @param value The expression to check. + * @return A new {@link BooleanExpr} representing the isNan operation. + */ + @BetaApi + public static BooleanExpr isNaN(Expr value) { + return new BooleanExpr("is_nan", value); + } + + /** + * Creates an expression that checks if a field's value evaluates to 'NaN' (Not a Number). + * + * @param fieldName The field to check. + * @return A new {@link BooleanExpr} representing the isNan operation. + */ + @BetaApi + public static BooleanExpr isNaN(String fieldName) { + return isNaN(field(fieldName)); + } + + /** + * Creates an expression that checks if the result of an expression is null. + * + * @param value The expression to check. + * @return A new {@link BooleanExpr} representing the isNull operation. + */ + @BetaApi + public static BooleanExpr isNull(Expr value) { + return new BooleanExpr("is_null", value); + } + + /** + * Creates an expression that checks if the value of a field is null. + * + * @param fieldName The field to check. + * @return A new {@link BooleanExpr} representing the isNull operation. + */ + @BetaApi + public static BooleanExpr isNull(String fieldName) { + return isNull(field(fieldName)); + } + + /** + * Creates an expression that checks if the result of an expression is not null. + * + * @param value The expression to check. + * @return A new {@link BooleanExpr} representing the isNotNull operation. + */ + @BetaApi + public static BooleanExpr isNotNull(Expr value) { + return new BooleanExpr("is_not_null", value); + } + + /** + * Creates an expression that checks if the value of a field is not null. + * + * @param fieldName The field to check. + * @return A new {@link BooleanExpr} representing the isNotNull operation. + */ + @BetaApi + public static BooleanExpr isNotNull(String fieldName) { + return isNotNull(field(fieldName)); + } + + // Numeric Operations + /** + * Creates an expression that rounds {@code numericExpr} to nearest integer. + * + *

Rounds away from zero in halfway cases. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing an integer result from the round operation. + */ + @BetaApi + public static Expr round(Expr numericExpr) { + return new FunctionExpr("round", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that rounds {@code numericField} to nearest integer. + * + *

Rounds away from zero in halfway cases. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing an integer result from the round operation. + */ + @BetaApi + public static Expr round(String numericField) { + return round(field(numericField)); + } + + /** + * Creates an expression that rounds off {@code numericExpr} to {@code decimalPlace} decimal + * places if {@code decimalPlace} is positive, rounds off digits to the left of the decimal point + * if {@code decimalPlace} is negative. Rounds away from zero in halfway cases. + * + * @param numericExpr An expression that returns number when evaluated. + * @param decimalPlace The number of decimal places to round. + * @return A new {@link Expr} representing the round operation. + */ + @BetaApi + public static Expr roundToPrecision(Expr numericExpr, int decimalPlace) { + return new FunctionExpr("round", ImmutableList.of(numericExpr, constant(decimalPlace))); + } + + /** + * Creates an expression that rounds off {@code numericField} to {@code decimalPlace} decimal + * places if {@code decimalPlace} is positive, rounds off digits to the left of the decimal point + * if {@code decimalPlace} is negative. Rounds away from zero in halfway cases. + * + * @param numericField Name of field that returns number when evaluated. + * @param decimalPlace The number of decimal places to round. + * @return A new {@link Expr} representing the round operation. + */ + @BetaApi + public static Expr roundToPrecision(String numericField, int decimalPlace) { + return roundToPrecision(field(numericField), decimalPlace); + } + + /** + * Creates an expression that rounds off {@code numericExpr} to {@code decimalPlace} decimal + * places if {@code decimalPlace} is positive, rounds off digits to the left of the decimal point + * if {@code decimalPlace} is negative. Rounds away from zero in halfway cases. + * + * @param numericExpr An expression that returns number when evaluated. + * @param decimalPlace The number of decimal places to round. + * @return A new {@link Expr} representing the round operation. + */ + @BetaApi + public static Expr roundToPrecision(Expr numericExpr, Expr decimalPlace) { + return new FunctionExpr("round", ImmutableList.of(numericExpr, decimalPlace)); + } + + /** + * Creates an expression that rounds off {@code numericField} to {@code decimalPlace} decimal + * places if {@code decimalPlace} is positive, rounds off digits to the left of the decimal point + * if {@code decimalPlace} is negative. Rounds away from zero in halfway cases. + * + * @param numericField Name of field that returns number when evaluated. + * @param decimalPlace The number of decimal places to round. + * @return A new {@link Expr} representing the round operation. + */ + @BetaApi + public static Expr roundToPrecision(String numericField, Expr decimalPlace) { + return roundToPrecision(field(numericField), decimalPlace); + } + + /** + * Creates an expression that returns the smallest integer that isn't less than {@code + * numericExpr}. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing an integer result from the ceil operation. + */ + @BetaApi + public static Expr ceil(Expr numericExpr) { + return new FunctionExpr("ceil", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that returns the smallest integer that isn't less than {@code + * numericField}. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing an integer result from the ceil operation. + */ + @BetaApi + public static Expr ceil(String numericField) { + return ceil(field(numericField)); + } + + /** + * Creates an expression that returns the largest integer that isn't less than {@code + * numericExpr}. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing an integer result from the floor operation. + */ + @BetaApi + public static Expr floor(Expr numericExpr) { + return new FunctionExpr("floor", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that returns the largest integer that isn't less than {@code + * numericField}. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing an integer result from the floor operation. + */ + @BetaApi + public static Expr floor(String numericField) { + return floor(field(numericField)); + } + + /** + * Creates an expression that returns the {@code numericExpr} raised to the power of the {@code + * exponent}. Returns infinity on overflow and zero on underflow. + * + * @param numericExpr An expression that returns number when evaluated. + * @param exponent The numeric power to raise the {@code numericExpr}. + * @return A new {@link Expr} representing a numeric result from raising {@code numericExpr} to + * the power of {@code exponent}. + */ + @BetaApi + public static Expr pow(Expr numericExpr, Number exponent) { + return new FunctionExpr("pow", ImmutableList.of(numericExpr, constant(exponent))); + } + + /** + * Creates an expression that returns the {@code numericField} raised to the power of the {@code + * exponent}. Returns infinity on overflow and zero on underflow. + * + * @param numericField Name of field that returns number when evaluated. + * @param exponent The numeric power to raise the {@code numericField}. + * @return A new {@link Expr} representing a numeric result from raising {@code numericField} to + * the power of {@code exponent}. + */ + @BetaApi + public static Expr pow(String numericField, Number exponent) { + return pow(field(numericField), exponent); + } + + /** + * Creates an expression that returns the {@code numericExpr} raised to the power of the {@code + * exponent}. Returns infinity on overflow and zero on underflow. + * + * @param numericExpr An expression that returns number when evaluated. + * @param exponent The numeric power to raise the {@code numericExpr}. + * @return A new {@link Expr} representing a numeric result from raising {@code numericExpr} to + * the power of {@code exponent}. + */ + @BetaApi + public static Expr pow(Expr numericExpr, Expr exponent) { + return new FunctionExpr("pow", ImmutableList.of(numericExpr, exponent)); + } + + /** + * Creates an expression that returns the {@code numericField} raised to the power of the {@code + * exponent}. Returns infinity on overflow and zero on underflow. + * + * @param numericField Name of field that returns number when evaluated. + * @param exponent The numeric power to raise the {@code numericField}. + * @return A new {@link Expr} representing a numeric result from raising {@code numericField} to + * the power of {@code exponent}. + */ + @BetaApi + public static Expr pow(String numericField, Expr exponent) { + return pow(field(numericField), exponent); + } + + /** + * Creates an expression that returns the absolute value of {@code numericExpr}. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the absolute value operation. + */ + @BetaApi + public static Expr abs(Expr numericExpr) { + return new FunctionExpr("abs", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that returns the absolute value of {@code numericField}. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the absolute value operation. + */ + @BetaApi + public static Expr abs(String numericField) { + return abs(field(numericField)); + } + + /** + * Creates an expression that returns Euler's number e raised to the power of {@code numericExpr}. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the exponentiation. + */ + @BetaApi + public static Expr exp(Expr numericExpr) { + return new FunctionExpr("exp", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that returns Euler's number e raised to the power of {@code + * numericField}. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the exponentiation. + */ + @BetaApi + public static Expr exp(String numericField) { + return exp(field(numericField)); + } + + /** + * Creates an expression that returns the natural logarithm (base e) of {@code numericExpr}. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the natural logarithm. + */ + @BetaApi + public static Expr ln(Expr numericExpr) { + return new FunctionExpr("ln", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that returns the natural logarithm (base e) of {@code numericField}. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the natural logarithm. + */ + @BetaApi + public static Expr ln(String numericField) { + return ln(field(numericField)); + } + + /** + * Creates an expression that returns the logarithm of {@code numericExpr} with a given {@code + * base}. + * + * @param numericExpr An expression that returns number when evaluated. + * @param base The base of the logarithm. + * @return A new {@link Expr} representing a numeric result from the logarithm of {@code + * numericExpr} with a given {@code base}. + */ + @BetaApi + public static Expr log(Expr numericExpr, Number base) { + return new FunctionExpr("log", ImmutableList.of(numericExpr, constant(base))); + } + + /** + * Creates an expression that returns the logarithm of {@code numericField} with a given {@code + * base}. + * + * @param numericField Name of field that returns number when evaluated. + * @param base The base of the logarithm. + * @return A new {@link Expr} representing a numeric result from the logarithm of {@code + * numericField} with a given {@code base}. + */ + @BetaApi + public static Expr log(String numericField, Number base) { + return log(field(numericField), base); + } + + /** + * Creates an expression that returns the logarithm of {@code numericExpr} with a given {@code + * base}. + * + * @param numericExpr An expression that returns number when evaluated. + * @param base The base of the logarithm. + * @return A new {@link Expr} representing a numeric result from the logarithm of {@code + * numericExpr} with a given {@code base}. + */ + @BetaApi + public static Expr log(Expr numericExpr, Expr base) { + return new FunctionExpr("log", ImmutableList.of(numericExpr, base)); + } + + /** + * Creates an expression that returns the logarithm of {@code numericField} with a given {@code + * base}. + * + * @param numericField Name of field that returns number when evaluated. + * @param base The base of the logarithm. + * @return A new {@link Expr} representing a numeric result from the logarithm of {@code + * numericField} with a given {@code base}. + */ + @BetaApi + public static Expr log(String numericField, Expr base) { + return log(field(numericField), base); + } + + /** + * Creates an expression that returns the base 10 logarithm of {@code numericExpr}. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the base 10 logarithm. + */ + @BetaApi + public static Expr log10(Expr numericExpr) { + return new FunctionExpr("log10", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that returns the base 10 logarithm of {@code numericField}. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the base 10 logarithm. + */ + @BetaApi + public static Expr log10(String numericField) { + return log10(field(numericField)); + } + + /** + * Creates an expression that returns the square root of {@code numericExpr}. + * + * @param numericExpr An expression that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the square root operation. + */ + @BetaApi + public static Expr sqrt(Expr numericExpr) { + return new FunctionExpr("sqrt", ImmutableList.of(numericExpr)); + } + + /** + * Creates an expression that returns the square root of {@code numericField}. + * + * @param numericField Name of field that returns number when evaluated. + * @return A new {@link Expr} representing the numeric result of the square root operation. + */ + @BetaApi + public static Expr sqrt(String numericField) { + return sqrt(field(numericField)); + } + + // String Operations + /** + * Creates an expression that return a pseudo-random number of type double in the range of [0, 1), + * inclusive of 0 and exclusive of 1. + * + * @return A new {@link Expr} representing the random number operation. + */ + @BetaApi + public static Expr rand() { + return new FunctionExpr("rand", ImmutableList.of()); + } + + // Logical/Comparison Operations + /** + * Creates an expression that checks if the results of {@code expr} is NOT 'NaN' (Not a Number). + * + * @param expr The expression to check. + * @return A new {@link BooleanExpr} representing the isNotNan operation. + */ + @BetaApi + public static BooleanExpr isNotNaN(Expr expr) { + return new BooleanExpr("is_not_nan", expr); + } + + /** + * Creates an expression that checks if the results of this expression is NOT 'NaN' (Not a + * Number). + * + * @param fieldName The field to check. + * @return A new {@link BooleanExpr} representing the isNotNan operation. + */ + @BetaApi + public static BooleanExpr isNotNaN(String fieldName) { + return isNotNaN(field(fieldName)); + } + + /** + * Creates an expression that returns the largest value between multiple input expressions or + * literal values. Based on Firestore's value type ordering. + * + * @param expr The first operand expression. + * @param others Optional additional expressions or literals. + * @return A new {@link Expr} representing the logical maximum operation. + */ + @BetaApi + public static Expr logicalMaximum(Expr expr, Object... others) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(expr); + builder.addAll(toArrayOfExprOrConstant(others)); + return new FunctionExpr("max", builder.build()); + } + + /** + * Creates an expression that returns the largest value between multiple input expressions or + * literal values. Based on Firestore's value type ordering. + * + * @param fieldName The first operand field name. + * @param others Optional additional expressions or literals. + * @return A new {@link Expr} representing the logical maximum operation. + */ + @BetaApi + public static Expr logicalMaximum(String fieldName, Object... others) { + return logicalMaximum(field(fieldName), others); + } + + /** + * Creates an expression that returns the smallest value between multiple input expressions or + * literal values. Based on Firestore's value type ordering. + * + * @param expr The first operand expression. + * @param others Optional additional expressions or literals. + * @return A new {@link Expr} representing the logical minimum operation. + */ + @BetaApi + public static Expr logicalMinimum(Expr expr, Object... others) { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(expr); + builder.addAll(toArrayOfExprOrConstant(others)); + return new FunctionExpr("min", builder.build()); + } + + /** + * Creates an expression that returns the smallest value between multiple input expressions or + * literal values. Based on Firestore's value type ordering. + * + * @param fieldName The first operand field name. + * @param others Optional additional expressions or literals. + * @return A new {@link Expr} representing the logical minimum operation. + */ + @BetaApi + public static Expr logicalMinimum(String fieldName, Object... others) { + return logicalMinimum(field(fieldName), others); + } + + /** + * Creates an expression that checks if the results of this expression is NOT 'NaN' (Not a + * Number). + * + * @return A new {@link BooleanExpr} representing the isNotNan operation. + */ + @BetaApi + public final BooleanExpr isNotNaN() { + return isNotNaN(this); + } + + /** + * Creates an expression that returns the largest value between multiple input expressions or + * literal values. Based on Firestore's value type ordering. + * + * @param others Optional additional expressions or literals. + * @return A new {@link Expr} representing the logical maximum operation. + */ + @BetaApi + public final Expr logicalMaximum(Object... others) { + return logicalMaximum(this, others); + } + + /** + * Creates an expression that returns the smallest value between multiple input expressions or + * literal values. Based on Firestore's value type ordering. + * + * @param others Optional additional expressions or literals. + * @return A new {@link Expr} representing the logical minimum operation. + */ + @BetaApi + public final Expr logicalMinimum(Object... others) { + return logicalMinimum(this, others); + } + + /** + * Creates an expression that rounds this numeric expression to nearest integer. + * + *

Rounds away from zero in halfway cases. + * + * @return A new {@link Expr} representing an integer result from the round operation. + */ + @BetaApi + public final Expr round() { + return round(this); + } + + /** + * Creates an expression that rounds off this numeric expression to {@code decimalPlace} decimal + * places if {@code decimalPlace} is positive, rounds off digits to the left of the decimal point + * if {@code decimalPlace} is negative. Rounds away from zero in halfway cases. + * + * @param decimalPlace The number of decimal places to round. + * @return A new {@link Expr} representing the round operation. + */ + @BetaApi + public final Expr roundToPrecision(int decimalPlace) { + return roundToPrecision(this, decimalPlace); + } + + /** + * Creates an expression that rounds off this numeric expression to {@code decimalPlace} decimal + * places if {@code decimalPlace} is positive, rounds off digits to the left of the decimal point + * if {@code decimalPlace} is negative. Rounds away from zero in halfway cases. + * + * @param decimalPlace The number of decimal places to round. + * @return A new {@link Expr} representing the round operation. + */ + @BetaApi + public final Expr roundToPrecision(Expr decimalPlace) { + return roundToPrecision(this, decimalPlace); + } + + /** + * Creates an expression that returns the smallest integer that isn't less than this numeric + * expression. + * + * @return A new {@link Expr} representing an integer result from the ceil operation. + */ + @BetaApi + public final Expr ceil() { + return ceil(this); + } + + /** + * Creates an expression that returns the largest integer that isn't less than this numeric + * expression. + * + * @return A new {@link Expr} representing an integer result from the floor operation. + */ + @BetaApi + public final Expr floor() { + return floor(this); + } + + /** + * Creates an expression that returns this numeric expression raised to the power of the {@code + * exponent}. Returns infinity on overflow and zero on underflow. + * + * @param exponent The numeric power to raise this numeric expression. + * @return A new {@link Expr} representing a numeric result from raising this numeric expression + * to the power of {@code exponent}. + */ + @BetaApi + public final Expr pow(Number exponent) { + return pow(this, exponent); + } + + /** + * Creates an expression that returns this numeric expression raised to the power of the {@code + * exponent}. Returns infinity on overflow and zero on underflow. + * + * @param exponent The numeric power to raise this numeric expression. + * @return A new {@link Expr} representing a numeric result from raising this numeric expression + * to the power of {@code exponent}. + */ + @BetaApi + public final Expr pow(Expr exponent) { + return pow(this, exponent); + } + + /** + * Creates an expression that returns the absolute value of this numeric expression. + * + * @return A new {@link Expr} representing the numeric result of the absolute value operation. + */ + @BetaApi + public final Expr abs() { + return abs(this); + } + + /** + * Creates an expression that returns Euler's number e raised to the power of this numeric + * expression. + * + * @return A new {@link Expr} representing the numeric result of the exponentiation. + */ + @BetaApi + public final Expr exp() { + return exp(this); + } + + /** + * Creates an expression that returns the natural logarithm (base e) of this numeric expression. + * + * @return A new {@link Expr} representing the numeric result of the natural logarithm. + */ + @BetaApi + public final Expr ln() { + return ln(this); + } + + /** + * Creates an expression that returns the logarithm of this numeric expression with a given {@code + * base}. + * + * @param base The base of the logarithm. + * @return A new {@link Expr} representing a numeric result from the logarithm of this numeric + * expression with a given {@code base}. + */ + @BetaApi + public final Expr log(Number base) { + return log(this, base); + } + + /** + * Creates an expression that returns the logarithm of this numeric expression with a given {@code + * base}. + * + * @param base The base of the logarithm. + * @return A new {@link Expr} representing a numeric result from the logarithm of this numeric + * expression with a given {@code base}. + */ + @BetaApi + public final Expr log(Expr base) { + return log(this, base); + } + + /** + * Creates an expression that returns the base 10 logarithm of this numeric expression. + * + * @return A new {@link Expr} representing the numeric result of the base 10 logarithm. + */ + @BetaApi + public final Expr log10() { + return log10(this); + } + + /** + * Creates an expression that returns the square root of this numeric expression. + * + * @return A new {@link Expr} representing the numeric result of the square root operation. + */ + @BetaApi + public final Expr sqrt() { + return sqrt(this); + } + + // Fluent API + /** + * Creates an expression that adds this numeric expression to another numeric expression. + * + * @param other Numeric expression to add. + * @return A new {@link Expr} representing the addition operation. + */ + @BetaApi + public final Expr add(Object other) { + return add(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that subtracts a numeric expressions from this numeric expression. + * + * @param other Constant to subtract. + * @return A new {@link Expr} representing the subtract operation. + */ + @BetaApi + public final Expr subtract(Object other) { + return subtract(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that multiplies this numeric expression with another numeric expression. + * + * @param other Numeric expression to multiply. + * @return A new {@link Expr} representing the multiplication operation. + */ + @BetaApi + public final Expr multiply(Object other) { + return multiply(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that divides this numeric expression by another numeric expression. + * + * @param other Numeric expression to divide this numeric expression by. + * @return A new {@link Expr} representing the division operation. + */ + @BetaApi + public final Expr divide(Object other) { + return divide(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that calculates the modulo (remainder) of dividing this numeric + * expressions by another numeric expression. + * + * @param other The numeric expression to divide this expression by. + * @return A new {@link Expr} representing the modulo operation. + */ + @BetaApi + public final Expr mod(Object other) { + return mod(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that checks if this expression is equal to a {@code value}. + * + * @param other The value to compare to. + * @return A new {@link BooleanExpr} representing the equality comparison. + */ + @BetaApi + public final BooleanExpr eq(Object other) { + return eq(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that checks if this expression is not equal to a {@code value}. + * + * @param other The value to compare to. + * @return A new {@link BooleanExpr} representing the inequality comparison. + */ + @BetaApi + public final BooleanExpr neq(Object other) { + return neq(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that checks if this expression is greater than a {@code value}. + * + * @param other The value to compare to. + * @return A new {@link BooleanExpr} representing the greater than comparison. + */ + @BetaApi + public final BooleanExpr gt(Object other) { + return gt(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that checks if this expression is greater than or equal to a {@code + * value}. + * + * @param other The value to compare to. + * @return A new {@link BooleanExpr} representing the greater than or equal to comparison. + */ + @BetaApi + public final BooleanExpr gte(Object other) { + return gte(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that checks if this expression is less than a value. + * + * @param other The value to compare to. + * @return A new {@link BooleanExpr} representing the less than comparison. + */ + @BetaApi + public final BooleanExpr lt(Object other) { + return lt(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that checks if this expression is less than or equal to a {@code value}. + * + * @param other The value to compare to. + * @return A new {@link BooleanExpr} representing the less than or equal to comparison. + */ + @BetaApi + public final BooleanExpr lte(Object other) { + return lte(this, toExprOrConstant(other)); + } + + /** + * Creates an expression that checks if this expression, when evaluated, is equal to any of the + * provided {@code values}. + * + * @param other The values to check against. + * @return A new {@link BooleanExpr} representing the 'IN' comparison. + */ + @BetaApi + public final BooleanExpr eqAny(List other) { + return eqAny(this, other); + } + + /** + * Creates an expression that checks if this expression, when evaluated, is not equal to all the + * provided {@code values}. + * + * @param other The values to check against. + * @return A new {@link BooleanExpr} representing the 'NOT IN' comparison. + */ + @BetaApi + public final BooleanExpr notEqAny(List other) { + return notEqAny(this, other); + } + + /** + * Creates an expression that calculates the character length of this string expression in UTF8. + * + * @return A new {@link Expr} representing the charLength operation. + */ + @BetaApi + public final Expr charLength() { + return charLength(this); + } + + /** + * Creates an expression that calculates the length of a string in UTF-8 bytes, or just the length + * of a Blob. + * + * @return A new {@link Expr} representing the length of the string in bytes. + */ + @BetaApi + public final Expr byteLength() { + return byteLength(this); + } + + /** + * Creates an expression that calculates the length of the expression if it is a string, array, + * map, or Blob. + * + * @return A new {@link Expr} representing the length of the expression. + */ + @BetaApi + public final Expr length() { + return length(this); + } + + /** + * Creates an expression that performs a case-sensitive wildcard string comparison. + * + * @param pattern The pattern to search for. You can use "%" as a wildcard character. + * @return A new {@link BooleanExpr} representing the like operation. + */ + @BetaApi + public final BooleanExpr like(Object pattern) { + return like(this, toExprOrConstant(pattern)); + } + + /** + * Creates an expression that checks if this string expression contains a specified regular + * expression as a substring. + * + * @param pattern The regular expression to use for the search. + * @return A new {@link BooleanExpr} representing the contains regular expression comparison. + */ + @BetaApi + public final BooleanExpr regexContains(Object pattern) { + return regexContains(this, toExprOrConstant(pattern)); + } + + /** + * Creates an expression that checks if this string expression matches a specified regular + * expression. + * + * @param pattern The regular expression to use for the match. + * @return A new {@link BooleanExpr} representing the regular expression match comparison. + */ + @BetaApi + public final BooleanExpr regexMatch(Object pattern) { + return regexMatch(this, toExprOrConstant(pattern)); + } + + /** + * Creates an expression that reverses this string expression. + * + * @return A new {@link Expr} representing the reversed string. + */ + @BetaApi + public final Expr strReverse() { + return strReverse(this); + } + + /** + * Creates an expression that checks if this string expression contains a specified substring. + * + * @param substring The expression representing the substring to search for. + * @return A new {@link BooleanExpr} representing the contains comparison. + */ + @BetaApi + public final BooleanExpr strContains(Object substring) { + return strContains(this, toExprOrConstant(substring)); + } + + /** + * Creates an expression that checks if this string expression starts with a given {@code prefix}. + * + * @param prefix The prefix string expression to check for. + * @return A new {@link Expr} representing the the 'starts with' comparison. + */ + @BetaApi + public final BooleanExpr startsWith(Object prefix) { + return startsWith(this, toExprOrConstant(prefix)); + } + + /** + * Creates an expression that checks if this string expression ends with a given {@code suffix}. + * + * @param suffix The suffix string expression to check for. + * @return A new {@link Expr} representing the 'ends with' comparison. + */ + @BetaApi + public final BooleanExpr endsWith(Object suffix) { + return endsWith(this, toExprOrConstant(suffix)); + } + + /** + * Creates an expression that returns a substring of the given string. + * + * @param index The starting index of the substring. + * @param length The length of the substring. + * @return A new {@link Expr} representing the substring. + */ + @BetaApi + public final Expr substring(Object index, Object length) { + return substring(this, toExprOrConstant(index), toExprOrConstant(length)); + } + + /** + * Creates an expression that converts this string expression to lowercase. + * + * @return A new {@link Expr} representing the lowercase string. + */ + @BetaApi + public final Expr toLower() { + return toLower(this); + } + + /** + * Creates an expression that converts this string expression to uppercase. + * + * @return A new {@link Expr} representing the lowercase string. + */ + @BetaApi + public final Expr toUpper() { + return toUpper(this); + } + + /** + * Creates an expression that removes leading and trailing whitespace from this string expression. + * + * @return A new {@link Expr} representing the trimmed string. + */ + @BetaApi + public final Expr trim() { + return trim(this); + } + + /** + * Creates an expression that concatenates string expressions and string constants together. + * + * @param others The string expressions or string constants to concatenate. + * @return A new {@link Expr} representing the concatenated string. + */ + @BetaApi + public final Expr strConcat(String... others) { + return strConcat(this, others); + } + + /** + * Creates an expression that concatenates string expressions together. + * + * @param others The string expressions or string constants to concatenate. + * @return A new {@link Expr} representing the concatenated string. + */ + @BetaApi + public final Expr strConcat(Expr... others) { + return strConcat(this, others); + } + + /** + * Accesses a map (object) value using the provided {@code key}. + * + * @param key The key to access in the map. + * @return A new {@link Expr} representing the value associated with the given key in the map. + */ + @BetaApi + public final Expr mapGet(Object key) { + return mapGet(this, toExprOrConstant(key)); + } + + /** + * Creates an expression that returns true if yhe result of this expression is absent. Otherwise, + * returns false even if the value is null. + * + * @return A new {@link BooleanExpr} representing the isAbsent operation. + */ + @BetaApi + public final BooleanExpr isAbsent() { + return isAbsent(this); + } + + /** + * Creates an expression that checks if this expression evaluates to 'NaN' (Not a Number). + * + * @return A new {@link BooleanExpr} representing the isNan operation. + */ + @BetaApi + public final BooleanExpr isNaN() { + return isNaN(this); + } + + /** + * Creates an expression that checks if tbe result of this expression is null. + * + * @return A new {@link BooleanExpr} representing the isNull operation. + */ + @BetaApi + public final BooleanExpr isNull() { + return isNull(this); + } + + /** + * Creates an expression that checks if tbe result of this expression is not null. + * + * @return A new {@link BooleanExpr} representing the isNotNull operation. + */ + @BetaApi + public final BooleanExpr isNotNull() { + return isNotNull(this); + } + + /** + * Creates an aggregation that calculates the sum of this numeric expression across multiple stage + * inputs. + * + * @return A new {@link AggregateFunction} representing the sum aggregation. + */ + @BetaApi + public final AggregateFunction sum() { + return AggregateFunction.sum(this); + } + + /** + * Creates an aggregation that calculates the average (mean) of this numeric expression across + * multiple stage inputs. + * + * @return A new {@link AggregateFunction} representing the average aggregation. + */ + @BetaApi + public final AggregateFunction avg() { + return AggregateFunction.avg(this); + } + + /** + * Creates an aggregation that finds the minimum value of this expression across multiple stage + * inputs. + * + * @return A new {@link AggregateFunction} representing the minimum aggregation. + */ + @BetaApi + public final AggregateFunction minimum() { + return AggregateFunction.minimum(this); + } + + /** + * Creates an aggregation that finds the maximum value of this expression across multiple stage + * inputs. + * + * @return A new {@link AggregateFunction} representing the maximum aggregation. + */ + @BetaApi + public final AggregateFunction maximum() { + return AggregateFunction.maximum(this); + } + + /** + * Creates an aggregation that counts the number of stage inputs with valid evaluations of the + * this expression. + * + * @return A new {@link AggregateFunction} representing the count aggregation. + */ + @BetaApi + public final AggregateFunction count() { + return AggregateFunction.count(this); + } + + /** + * Creates an aggregation that counts the number of distinct values of this expression. + * + * @return A new {@link AggregateFunction} representing the count distinct aggregation. + */ + @BetaApi + public final AggregateFunction countDistinct() { + return AggregateFunction.countDistinct(this); + } + + /** + * Create an {@link Ordering} that sorts documents in ascending order based on value of this + * expression + * + * @return A new {@link Ordering} object with ascending sort by this expression. + */ + @BetaApi + public final Ordering ascending() { + return Ordering.ascending(this); + } + + /** + * Create an {@link Ordering} that sorts documents in descending order based on value of this + * expression + * + * @return A new {@link Ordering} object with descending sort by this expression. + */ + @BetaApi + public final Ordering descending() { + return Ordering.descending(this); + } + + /** + * Assigns an alias to this expression. + * + *

Aliases are useful for renaming fields in the output of a stage or for giving meaningful + * names to calculated values. + * + * @param alias The alias to assign to this expression. + * @return A new {@link Selectable} (typically an {@link AliasedExpr}) that wraps this expression + * and associates it with the provided alias. + */ + @BetaApi + public Selectable as(String alias) { + return new AliasedExpr<>(this, alias); + } + + // Fluent API for new functions + /** + * Creates an expression that merges multiple maps into a single map. If multiple maps have the + * same key, the later value is used. + * + * @param secondMap Map expression that will be merged. + * @param otherMaps Additional maps to merge. + * @return A new {@link Expr} representing the mapMerge operation. + */ + @BetaApi + public final Expr mapMerge(Expr secondMap, Expr... otherMaps) { + return mapMerge(this, secondMap, otherMaps); + } + + /** + * Creates an expression that removes a key from this map expression. + * + * @param key The name of the key to remove from this map expression. + * @return A new {@link Expr} that evaluates to a modified map. + */ + @BetaApi + public final Expr mapRemove(Expr key) { + return mapRemove(this, key); + } + + /** + * Creates an expression that removes a key from this map expression. + * + * @param key The name of the key to remove from this map expression. + * @return A new {@link Expr} that evaluates to a modified map. + */ + @BetaApi + public final Expr mapRemove(String key) { + return mapRemove(this, key); + } + + /** + * Creates an expression that concatenates a field's array value with other arrays. + * + * @param otherArrays Optional additional array expressions or array literals to concatenate. + * @return A new {@link Expr} representing the arrayConcat operation. + */ + @BetaApi + public final Expr arrayConcat(Expr... otherArrays) { + return arrayConcat(this, otherArrays); + } + + /** + * Reverses the order of elements in the array. + * + * @return A new {@link Expr} representing the arrayReverse operation. + */ + @BetaApi + public final Expr arrayReverse() { + return arrayReverse(this); + } + + /** + * Creates an expression that checks if array contains a specific {@code element}. + * + * @param element The element to search for in the array. + * @return A new {@link BooleanExpr} representing the arrayContains operation. + */ + @BetaApi + public final BooleanExpr arrayContains(Object element) { + return arrayContains(this, element); + } + + /** + * Creates an expression that checks if array contains all the specified {@code values}. + * + * @param values The elements to check for in the array. + * @return A new {@link BooleanExpr} representing the arrayContainsAll operation. + */ + @BetaApi + public final BooleanExpr arrayContainsAll(List values) { + return arrayContainsAll(this, values); + } + + /** + * Creates an expression that checks if array contains all elements of {@code arrayExpression}. + * + * @param arrayExpression The elements to check for in the array. + * @return A new {@link BooleanExpr} representing the arrayContainsAll operation. + */ + @BetaApi + public final BooleanExpr arrayContainsAll(Expr arrayExpression) { + return arrayContainsAll(this, arrayExpression); + } + + /** + * Creates an expression that checks if array contains any of the specified {@code values}. + * + * @param values The elements to check for in the array. + * @return A new {@link BooleanExpr} representing the arrayContainsAny operation. + */ + @BetaApi + public final BooleanExpr arrayContainsAny(List values) { + return arrayContainsAny(this, values); + } + + /** + * Creates an expression that checks if array contains any elements of {@code arrayExpression}. + * + * @param arrayExpression The elements to check for in the array. + * @return A new {@link BooleanExpr} representing the arrayContainsAny operation. + */ + @BetaApi + public final BooleanExpr arrayContainsAny(Expr arrayExpression) { + return arrayContainsAny(this, arrayExpression); + } + + /** + * Creates an expression that calculates the length of an array expression. + * + * @return A new {@link Expr} representing the length of the array. + */ + @BetaApi + public final Expr arrayLength() { + return arrayLength(this); + } + + /** + * Creates an expression that indexes into an array from the beginning or end and return the + * element. If the offset exceeds the array length, an error is returned. A negative offset, + * starts from the end. + * + * @param offset An Expr evaluating to the index of the element to return. + * @return A new {@link Expr} representing the arrayGet operation. + */ + @BetaApi + public final Expr arrayGet(Expr offset) { + return arrayGet(this, offset); + } + + /** + * Creates an expression that indexes into an array from the beginning or end and return the + * element. If the offset exceeds the array length, an error is returned. A negative offset, + * starts from the end. + * + * @param offset An Expr evaluating to the index of the element to return. + * @return A new {@link Expr} representing the arrayOffset operation. + */ + @BetaApi + public final Expr arrayGet(int offset) { + return arrayGet(this, offset); + } + + /** + * Calculates the Cosine distance between this and another vector expressions. + * + * @param vector The other vector (represented as an Expr) to compare against. + * @return A new {@link Expr} representing the cosine distance between the two vectors. + */ + @BetaApi + public final Expr cosineDistance(Expr vector) { + return cosineDistance(this, vector); + } + + /** + * Calculates the Cosine distance between this vector expression and a vector literal. + * + * @param vector The other vector (as an array of doubles) to compare against. + * @return A new {@link Expr} representing the cosine distance between the two vectors. + */ + @BetaApi + public final Expr cosineDistance(double[] vector) { + return cosineDistance(this, vector); + } + + /** + * Calculates the dot product distance between this and another vector expression. + * + * @param vector The other vector (represented as an Expr) to compare against. + * @return A new {@link Expr} representing the dot product distance between the two vectors. + */ + @BetaApi + public final Expr dotProduct(Expr vector) { + return dotProduct(this, vector); + } + + /** + * Calculates the dot product distance between this vector expression and a vector literal. + * + * @param vector The other vector (as an array of doubles) to compare against. + * @return A new {@link Expr} representing the dot product distance between the two vectors. + */ + @BetaApi + public final Expr dotProduct(double[] vector) { + return dotProduct(this, vector); + } + + /** + * Calculates the Euclidean distance between this and another vector expression. + * + * @param vector The other vector (represented as an Expr) to compare against. + * @return A new {@link Expr} representing the Euclidean distance between the two vectors. + */ + @BetaApi + public final Expr euclideanDistance(Expr vector) { + return euclideanDistance(this, vector); + } + + /** + * Calculates the Euclidean distance between this vector expression and a vector literal. + * + * @param vector The other vector (as an array of doubles) to compare against. + * @return A new {@link Expr} representing the Euclidean distance between the two vectors. + */ + @BetaApi + public final Expr euclideanDistance(double[] vector) { + return euclideanDistance(this, vector); + } + + /** + * Creates an expression that calculates the length (dimension) of a Firestore Vector. + * + * @return A new {@link Expr} representing the length (dimension) of the vector. + */ + @BetaApi + public final Expr vectorLength() { + return vectorLength(this); + } + + /** + * Creates an expression that interprets this expression as the number of microseconds since the + * Unix epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public final Expr unixMicrosToTimestamp() { + return unixMicrosToTimestamp(this); + } + + /** + * Creates an expression that converts this timestamp expression to the number of microseconds + * since the Unix epoch (1970-01-01 00:00:00 UTC). + * + * @return A new {@link Expr} representing the number of microseconds since epoch. + */ + @BetaApi + public final Expr timestampToUnixMicros() { + return timestampToUnixMicros(this); + } + + /** + * Creates an expression that interprets this expression as the number of milliseconds since the + * Unix epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public final Expr unixMillisToTimestamp() { + return unixMillisToTimestamp(this); + } + + /** + * Creates an expression that converts this timestamp expression to the number of milliseconds + * since the Unix epoch (1970-01-01 00:00:00 UTC). + * + * @return A new {@link Expr} representing the number of milliseconds since epoch. + */ + @BetaApi + public final Expr timestampToUnixMillis() { + return timestampToUnixMillis(this); + } + + /** + * Creates an expression that interprets this expression as the number of seconds since the Unix + * epoch (1970-01-01 00:00:00 UTC) and returns a timestamp. + * + * @return A new {@link Expr} representing the timestamp. + */ + @BetaApi + public final Expr unixSecondsToTimestamp() { + return unixSecondsToTimestamp(this); + } + + /** + * Creates an expression that converts this timestamp expression to the number of seconds since + * the Unix epoch (1970-01-01 00:00:00 UTC). + * + * @return A new {@link Expr} representing the number of seconds since epoch. + */ + @BetaApi + public final Expr timestampToUnixSeconds() { + return timestampToUnixSeconds(this); + } + + /** + * Creates an expression that adds a specified amount of time to this timestamp expression. + * + * @param unit The expression representing the unit of time to add. Valid units include + * "microsecond", "millisecond", "second", "minute", "hour" and "day". + * @param amount The expression representing the amount of time to add. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public final Expr timestampAdd(Expr unit, Expr amount) { + return timestampAdd(this, unit, amount); + } + + /** + * Creates an expression that adds a specified amount of time to this timestamp expression. + * + * @param unit The unit of time to add. Valid units include "microsecond", "millisecond", + * "second", "minute", "hour" and "day". + * @param amount The amount of time to add. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public final Expr timestampAdd(String unit, long amount) { + return timestampAdd(this, unit, amount); + } + + /** + * Creates an expression that subtracts a specified amount of time to this timestamp expression. + * + * @param unit The expression representing the unit of time to subtract. Valid units include + * "microsecond", "millisecond", "second", "minute", "hour" and "day". + * @param amount The expression representing the amount of time to subtract. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public final Expr timestampSub(Expr unit, Expr amount) { + return timestampSub(this, unit, amount); + } + + /** + * Creates an expression that subtracts a specified amount of time to this timestamp expression. + * + * @param unit The unit of time to subtract. Valid units include "microsecond", "millisecond", + * "second", "minute", "hour" and "day". + * @param amount The amount of time to subtract. + * @return A new {@link Expr} representing the resulting timestamp. + */ + @BetaApi + public final Expr timestampSub(String unit, long amount) { + return timestampSub(this, unit, amount); + } + + /** + * Creates an expression that checks if this expression evaluates to a name of the field that + * exists. + * + * @return A new {@link Expr} representing the exists check. + */ + @BetaApi + public final BooleanExpr exists() { + return exists(this); + } + + /** + * Creates a conditional expression that evaluates to a {@code thenExpr} expression if this + * condition is true or an {@code elseExpr} expression if the condition is false. + * + * @param thenExpr The expression to evaluate if the condition is true. + * @param elseExpr The expression to evaluate if the condition is false. + * @return A new {@link Expr} representing the conditional operation. + */ + @BetaApi + public final Expr cond(Expr thenExpr, Expr elseExpr) { + return cond((BooleanExpr) this, thenExpr, elseExpr); + } + + /** + * Creates a conditional expression that evaluates to a {@code thenValue} if this condition is + * true or an {@code elseValue} if the condition is false. + * + * @param thenValue Value if the condition is true. + * @param elseValue Value if the condition is false. + * @return A new {@link Expr} representing the conditional operation. + */ + @BetaApi + public final Expr cond(Object thenValue, Object elseValue) { + return cond((BooleanExpr) this, thenValue, elseValue); + } + + /** + * Creates an expression that returns the {@code catchExpr} argument if there is an error, else + * return the result of this expression. + * + * @param catchExpr The catch expression that will be evaluated and returned if the this + * expression produces an error. + * @return A new {@link Expr} representing the ifError operation. + */ + @BetaApi + public final Expr ifError(Expr catchExpr) { + return ifError(this, catchExpr); + } + + /** + * Creates an expression that returns the {@code catchValue} argument if there is an error, else + * return the result of this expression. + * + * @param catchValue The value that will be returned if this expression produces an error. + * @return A new {@link Expr} representing the ifError operation. + */ + @BetaApi + public final Expr ifError(Object catchValue) { + return ifError(this, catchValue); + } + + /** + * Creates an expression that checks if this expression produces an error. + * + * @return A new {@link BooleanExpr} representing the `isError` check. + */ + @BetaApi + public final BooleanExpr isError() { + return isError(this); + } + + /** + * Creates an expression that returns the document ID from this path expression. + * + * @return A new {@link Expr} representing the documentId operation. + */ + @BetaApi + public final Expr documentId() { + return documentId(this); + } + + /** + * Creates an expression that returns the collection ID from this path expression. + * + * @return A new {@link Expr} representing the collectionId operation. + */ + @BetaApi + public final Expr collectionId() { + return collectionId(this); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Field.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Field.java new file mode 100644 index 000000000..4729d193e --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Field.java @@ -0,0 +1,114 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.FieldPath; +import com.google.cloud.firestore.Pipeline; +import com.google.common.base.Objects; +import com.google.firestore.v1.Value; +import javax.annotation.Nullable; + +/** + * Represents a reference to a field in a Firestore document. + * + *

Field references are used to access document field values in expressions and to specify fields + * for sorting, filtering, and projecting data in Firestore pipelines. + * + *

You can create a `Field` instance using the static {@link #of(String)} method: + * + *

{@code
+ * // Create a Field instance for the 'name' field
+ * Field nameField = Field.of("name");
+ *
+ * // Create a Field instance for a nested field 'address.city'
+ * Field cityField = Field.of("address.city");
+ * }
+ */ +@BetaApi +public final class Field extends Expr implements Selectable { + public static final String DOCUMENT_ID = "__name__"; + private final FieldPath path; + @Nullable private Pipeline pipeline; // Nullable + + private Field(FieldPath path) { + this.path = path; + } + + /** + * Creates a {@code Field} instance representing the field at the given path. + * + *

The path can be a simple field name (e.g., "name") or a dot-separated path to a nested field + * (e.g., "address.city"). + * + *

Example: + * + *

{@code
+   * // Create a Field instance for the 'title' field
+   * Field titleField = Field.of("title");
+   *
+   * // Create a Field instance for a nested field 'author.firstName'
+   * Field authorFirstNameField = Field.of("author.firstName");
+   * }
+ * + * @param path The path to the field. + * @return A new {@code Field} instance representing the specified field. + */ + @InternalApi + public static Field ofUserPath(String path) { + if (path.equals(DOCUMENT_ID)) { + return new Field(FieldPath.documentId()); + } + return new Field(FieldPath.fromDotSeparatedString(path)); + } + + @InternalApi + public static Field ofServerPath(String path) { + if (path.equals(DOCUMENT_ID)) { + return new Field(FieldPath.documentId()); + } + return new Field(FieldPath.fromServerFormat(path)); + } + + @InternalApi + public Value toProto() { + return Value.newBuilder().setFieldReferenceValue(path.toString()).build(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Field field = (Field) o; + return Objects.equal(path, field.path) && Objects.equal(pipeline, field.pipeline); + } + + @Override + public int hashCode() { + return Objects.hashCode(path, pipeline); + } + + @InternalApi + public FieldPath getPath() { + return path; + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/FunctionExpr.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/FunctionExpr.java new file mode 100644 index 000000000..564e01deb --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/FunctionExpr.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.common.base.Objects; +import com.google.firestore.v1.Value; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +@BetaApi +public class FunctionExpr extends Expr { + private final String name; + private final List params; + + FunctionExpr(String name, List params) { + this.name = name; + this.params = Collections.unmodifiableList(params); + } + + @InternalApi + @Override + Value toProto() { + return Value.newBuilder() + .setFunctionValue( + com.google.firestore.v1.Function.newBuilder() + .setName(this.name) + .addAllArgs( + this.params.stream() + .map(FunctionUtils::exprToValue) + .collect(Collectors.toList()))) + .build(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FunctionExpr that = (FunctionExpr) o; + return Objects.equal(name, that.name) && Objects.equal(params, that.params); + } + + @Override + public int hashCode() { + return Objects.hashCode(name, params); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/FunctionUtils.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/FunctionUtils.java new file mode 100644 index 000000000..42290f0df --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/FunctionUtils.java @@ -0,0 +1,33 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.InternalApi; +import com.google.firestore.v1.Value; + +@InternalApi +public final class FunctionUtils { + @InternalApi + public static Value exprToValue(Expr expr) { + return (expr == null ? Constant.NULL : expr).toProto(); + } + + @InternalApi + public static Value aggregateFunctionToValue(AggregateFunction expr) { + return expr.toProto(); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Ordering.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Ordering.java new file mode 100644 index 000000000..5ac39148e --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Ordering.java @@ -0,0 +1,79 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.firestore.v1.MapValue; +import com.google.firestore.v1.Value; +import java.util.Locale; + +@BetaApi +public final class Ordering { + + private final Expr expr; + private final Ordering.Direction dir; + + private Ordering(Expr expr, Ordering.Direction dir) { + this.expr = expr; + this.dir = dir; + } + + @BetaApi + public enum Direction { + ASCENDING, + DESCENDING; + + @Override + public String toString() { + return name().toLowerCase(Locale.getDefault()); + } + } + + @InternalApi + public Value toProto() { + return Value.newBuilder() + .setMapValue( + MapValue.newBuilder() + .putFields("direction", encodeValue(dir.toString())) + .putFields("expression", expr.toProto()) + .build()) + .build(); + } + + @BetaApi + public static Ordering ascending(Expr expr) { + return new Ordering(expr, Direction.ASCENDING); + } + + @BetaApi + public static Ordering descending(Expr expr) { + return new Ordering(expr, Direction.DESCENDING); + } + + @InternalApi + public Expr getExpr() { + return expr; + } + + @InternalApi + public Ordering.Direction getDir() { + return dir; + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Selectable.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Selectable.java new file mode 100644 index 000000000..cf7bc71c0 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Selectable.java @@ -0,0 +1,22 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.expressions; + +import com.google.api.core.BetaApi; + +@BetaApi +public interface Selectable {} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AbstractOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AbstractOptions.java new file mode 100644 index 000000000..4000a5344 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AbstractOptions.java @@ -0,0 +1,95 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.cloud.firestore.PipelineUtils; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.cloud.firestore.pipeline.expressions.Field; +import com.google.cloud.firestore.pipeline.expressions.FunctionUtils; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; +import com.google.firestore.v1.Value; +import java.util.Arrays; +import java.util.List; + +/** + * Parent class to Pipeline and Stage options. + * + *

Provides a base set of `wither` methods for adding undefined options. + * + *

Standardizes structure of options for uniform encoding and handling. + * + *

Intentionally package-private to prevent extension outside of library. + * + * @param Subclass type. + */ +abstract class AbstractOptions { + + protected final InternalOptions options; + + AbstractOptions(InternalOptions options) { + this.options = options; + } + + abstract T self(InternalOptions options); + + public final T with(String key, String value) { + return with(key, encodeValue(value)); + } + + public final T with(String key, boolean value) { + return with(key, encodeValue(value)); + } + + public final T with(String key, long value) { + return with(key, encodeValue(value)); + } + + public final T with(String key, double value) { + return with(key, encodeValue(value)); + } + + public final T with(String key, Field value) { + return with(key, value.toProto()); + } + + protected final T with(String key, Value value) { + return self(options.with(key, value)); + } + + protected final T with(String key, String[] values) { + return self(options.with(key, Arrays.stream(values).map(PipelineUtils::encodeValue)::iterator)); + } + + protected final T with(String key, List expressions) { + return self(options.with(key, Lists.transform(expressions, FunctionUtils::exprToValue))); + } + + protected final T with(String key, AbstractOptions subSection) { + return self(options.with(key, subSection.options)); + } + + public final T withSection(String key, GenericOptions subSection) { + return with(key, subSection); + } + + final ImmutableMap toMap() { + return options.options; + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AddFields.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AddFields.java new file mode 100644 index 000000000..b7963fbb5 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AddFields.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.firestore.v1.Value; +import java.util.Collections; +import java.util.Map; + +@InternalApi +public final class AddFields extends Stage { + + private final Map fields; + + @InternalApi + public AddFields(Map fields) { + super("add_fields", InternalOptions.EMPTY); + this.fields = fields; + } + + @Override + Iterable toStageArgs() { + return Collections.singletonList(encodeValue(fields)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Aggregate.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Aggregate.java new file mode 100644 index 000000000..027b5a7e0 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Aggregate.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.BetaApi; +import com.google.cloud.firestore.PipelineUtils; +import com.google.cloud.firestore.pipeline.expressions.AggregateFunction; +import com.google.cloud.firestore.pipeline.expressions.AliasedAggregate; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.cloud.firestore.pipeline.expressions.Selectable; +import com.google.firestore.v1.Value; +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Nonnull; + +@BetaApi +public final class Aggregate extends Stage { + + private final Map groups; + private final Map accumulators; + + @BetaApi + public Aggregate withGroups(String... fields) { + return new Aggregate( + PipelineUtils.fieldNamesToMap(fields), this.accumulators, new AggregateOptions()); + } + + @BetaApi + public Aggregate withGroups(Selectable... selectables) { + return new Aggregate( + PipelineUtils.selectablesToMap(selectables), this.accumulators, new AggregateOptions()); + } + + @BetaApi + public static Aggregate withAccumulators(AliasedAggregate... accumulators) { + return new Aggregate( + Collections.emptyMap(), + Arrays.stream(accumulators) + .collect(Collectors.toMap(AliasedAggregate::getAlias, AliasedAggregate::getExpr)), + new AggregateOptions()); + } + + @BetaApi + public Aggregate withOptions(@Nonnull AggregateOptions options) { + return new Aggregate(groups, accumulators, options); + } + + private Aggregate( + Map groups, + Map accumulators, + AggregateOptions options) { + super("aggregate", options.options); + if (accumulators.isEmpty()) { + throw new IllegalArgumentException( + "Must specify at least one accumulator for aggregate() stage. There is a distinct() stage if only distinct group values are needed."); + } + + this.groups = groups; + this.accumulators = accumulators; + } + + @Override + Iterable toStageArgs() { + return Arrays.asList(encodeValue(accumulators), encodeValue(groups)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AggregateHints.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AggregateHints.java new file mode 100644 index 000000000..8538ad2d4 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AggregateHints.java @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +public final class AggregateHints extends AbstractOptions { + + public AggregateHints() { + this(InternalOptions.EMPTY); + } + + AggregateHints(InternalOptions options) { + super(options); + } + + @Override + AggregateHints self(InternalOptions options) { + return new AggregateHints(options); + } + + public AggregateHints withForceStreamableEnabled() { + return with("force_streamable", true); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AggregateOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AggregateOptions.java new file mode 100644 index 000000000..47b2c1d65 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/AggregateOptions.java @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +public final class AggregateOptions extends AbstractOptions { + + public AggregateOptions() { + this(InternalOptions.EMPTY); + } + + AggregateOptions(InternalOptions options) { + super(options); + } + + @Override + AggregateOptions self(InternalOptions options) { + return new AggregateOptions(options); + } + + public AggregateOptions withHints(AggregateHints hints) { + return with("hints", hints); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Collection.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Collection.java new file mode 100644 index 000000000..0d049b0ee --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Collection.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.api.core.InternalApi; +import com.google.firestore.v1.Value; +import java.util.Collections; +import javax.annotation.Nonnull; + +@InternalApi +public final class Collection extends Stage { + + @Nonnull private final String path; + + public Collection(@Nonnull String path, CollectionOptions options) { + super("collection", options.options); + if (!path.startsWith("/")) { + this.path = "/" + path; + } else { + this.path = path; + } + } + + public Collection withOptions(CollectionOptions options) { + return new Collection(path, options); + } + + @Override + Iterable toStageArgs() { + return Collections.singleton(Value.newBuilder().setReferenceValue(path).build()); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionGroup.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionGroup.java new file mode 100644 index 000000000..f3535230a --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionGroup.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.InternalApi; +import com.google.common.collect.ImmutableList; +import com.google.firestore.v1.Value; + +@InternalApi +public final class CollectionGroup extends Stage { + + private final String collectionId; + + @InternalApi + public CollectionGroup(String collectionId, CollectionGroupOptions options) { + super("collection_group", options.options); + this.collectionId = collectionId; + } + + public CollectionGroup withOptions(CollectionGroupOptions options) { + return new CollectionGroup(collectionId, options); + } + + @Override + Iterable toStageArgs() { + return ImmutableList.of( + Value.newBuilder().setReferenceValue("").build(), encodeValue(collectionId)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionGroupOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionGroupOptions.java new file mode 100644 index 000000000..e42bef68b --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionGroupOptions.java @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +public final class CollectionGroupOptions extends AbstractOptions { + + public CollectionGroupOptions() { + this(InternalOptions.EMPTY); + } + + CollectionGroupOptions(InternalOptions options) { + super(options); + } + + @Override + CollectionGroupOptions self(InternalOptions options) { + return new CollectionGroupOptions(options); + } + + public CollectionGroupOptions withHints(CollectionHints hints) { + return with("hints", hints); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionHints.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionHints.java new file mode 100644 index 000000000..887bc61dd --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionHints.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +public final class CollectionHints extends AbstractOptions { + + public CollectionHints() { + this(InternalOptions.EMPTY); + } + + CollectionHints(InternalOptions options) { + super(options); + } + + @Override + CollectionHints self(InternalOptions options) { + return new CollectionHints(options); + } + + public CollectionHints withForceIndex(String value) { + return with("forceIndex", value); + } + + public CollectionHints withIgnoreIndexFields(String... values) { + return with("ignore_index_fields", values); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionOptions.java new file mode 100644 index 000000000..c24da4d1a --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/CollectionOptions.java @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +public final class CollectionOptions extends AbstractOptions { + + public CollectionOptions() { + super(InternalOptions.EMPTY); + } + + CollectionOptions(InternalOptions options) { + super(options); + } + + @Override + CollectionOptions self(InternalOptions options) { + return new CollectionOptions(options); + } + + public CollectionOptions withHints(CollectionHints hints) { + return with("hints", hints); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Database.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Database.java new file mode 100644 index 000000000..121cde8f5 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Database.java @@ -0,0 +1,35 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.api.core.InternalApi; +import com.google.firestore.v1.Value; +import java.util.Collections; + +@InternalApi +public final class Database extends Stage { + + @InternalApi + public Database() { + super("database", InternalOptions.EMPTY); + } + + @Override + Iterable toStageArgs() { + return Collections.emptyList(); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Distinct.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Distinct.java new file mode 100644 index 000000000..03e7b486a --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Distinct.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.firestore.v1.Value; +import java.util.Collections; +import java.util.Map; + +@BetaApi +public final class Distinct extends Stage { + + private final Map groups; + + @InternalApi + public Distinct(Map groups) { + super("distinct", InternalOptions.EMPTY); + this.groups = groups; + } + + @Override + Iterable toStageArgs() { + return Collections.singletonList(encodeValue(groups)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Documents.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Documents.java new file mode 100644 index 000000000..93dd2322e --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Documents.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.DocumentReference; +import com.google.common.collect.Iterables; +import com.google.firestore.v1.Value; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@InternalApi +public final class Documents extends Stage { + + private List documents; + + @InternalApi + Documents(List documents) { + super("documents", InternalOptions.EMPTY); + this.documents = documents; + } + + @InternalApi + public static Documents of(DocumentReference... documents) { + return new Documents( + Arrays.stream(documents).map(doc -> "/" + doc.getPath()).collect(Collectors.toList())); + } + + @Override + Iterable toStageArgs() { + return Iterables.transform(documents, doc -> Value.newBuilder().setReferenceValue(doc).build()); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ExplainOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ExplainOptions.java new file mode 100644 index 000000000..edafba572 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ExplainOptions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.cloud.firestore.PipelineUtils; +import com.google.firestore.v1.Value; + +public final class ExplainOptions extends AbstractOptions { + + public static class ExecutionMode { + public static final ExecutionMode EXPLAIN = new ExecutionMode("explain"); + public static final ExecutionMode ANALYZE = new ExecutionMode("analyze"); + + private final Value value; + + private ExecutionMode(String format) { + this.value = PipelineUtils.encodeValue(format); + } + + public Value toProto() { + return value; + } + } + + public ExplainOptions() { + super(InternalOptions.EMPTY); + } + + ExplainOptions(InternalOptions options) { + super(options); + } + + @Override + ExplainOptions self(InternalOptions options) { + return new ExplainOptions(options); + } + + public ExplainOptions withExecutionMode(ExecutionMode mode) { + return with("mode", mode.toProto()); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/FindNearest.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/FindNearest.java new file mode 100644 index 000000000..206ed3a86 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/FindNearest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.VectorValue; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.common.collect.ImmutableList; +import com.google.firestore.v1.Value; + +@BetaApi +public final class FindNearest extends Stage { + + public static final class DistanceMeasure { + + final String protoString; + + private DistanceMeasure(String protoString) { + this.protoString = protoString; + } + + public static final DistanceMeasure EUCLIDEAN = new DistanceMeasure("euclidean"); + public static final DistanceMeasure COSINE = new DistanceMeasure("cosine"); + public static final DistanceMeasure DOT_PRODUCT = new DistanceMeasure("dot_product"); + + public static DistanceMeasure generic(String name) { + return new DistanceMeasure(name); + } + + Value toProto() { + return encodeValue(protoString); + } + } + + private final Expr property; + private final VectorValue vector; + private final DistanceMeasure distanceMeasure; + + @InternalApi + public FindNearest( + Expr property, + VectorValue vector, + DistanceMeasure distanceMeasure, + FindNearestOptions options) { + super("find_nearest", options.options); + this.property = property; + this.vector = vector; + this.distanceMeasure = distanceMeasure; + } + + @Override + Iterable toStageArgs() { + return ImmutableList.of(encodeValue(property), encodeValue(vector), distanceMeasure.toProto()); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/FindNearestOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/FindNearestOptions.java new file mode 100644 index 000000000..a240e4fc9 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/FindNearestOptions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.pipeline.expressions.Expr.field; + +import com.google.api.core.BetaApi; +import com.google.cloud.firestore.pipeline.expressions.Field; + +@BetaApi +public final class FindNearestOptions extends AbstractOptions { + + public FindNearestOptions() { + this(InternalOptions.EMPTY); + } + + private FindNearestOptions(InternalOptions options) { + super(options); + } + + @Override + FindNearestOptions self(InternalOptions options) { + return new FindNearestOptions(options); + } + + public FindNearestOptions withLimit(long limit) { + return with("limit", limit); + } + + public FindNearestOptions withDistanceField(Field distanceField) { + return with("distance_field", distanceField); + } + + public FindNearestOptions withDistanceField(String distanceField) { + return withDistanceField(field(distanceField)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/GenericOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/GenericOptions.java new file mode 100644 index 000000000..28198dd83 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/GenericOptions.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.cloud.firestore.pipeline.expressions.Field; + +public final class GenericOptions extends AbstractOptions { + + public GenericOptions() { + this(InternalOptions.EMPTY); + } + + public static GenericOptions of(String key, String value) { + return new GenericOptions(InternalOptions.of(key, encodeValue(value))); + } + + public static GenericOptions of(String key, boolean value) { + return new GenericOptions(InternalOptions.of(key, encodeValue(value))); + } + + public static GenericOptions of(String key, long value) { + return new GenericOptions(InternalOptions.of(key, encodeValue(value))); + } + + public static GenericOptions of(String key, double value) { + return new GenericOptions(InternalOptions.of(key, encodeValue(value))); + } + + public static GenericOptions of(String key, Field value) { + return new GenericOptions(InternalOptions.of(key, value.toProto())); + } + + GenericOptions(InternalOptions options) { + super(options); + } + + @Override + protected GenericOptions self(InternalOptions options) { + return new GenericOptions(options); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/GenericStage.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/GenericStage.java new file mode 100644 index 000000000..4236825fc --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/GenericStage.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.PipelineUtils; +import com.google.common.collect.Iterables; +import com.google.firestore.v1.Value; +import java.util.List; + +@InternalApi +public final class GenericStage extends Stage { + + private List params; + + @InternalApi + public GenericStage(String name, List params, GenericOptions optionalParams) { + super(name, optionalParams.options); + this.params = params; + } + + @Override + Iterable toStageArgs() { + return Iterables.transform(params, PipelineUtils::encodeValue); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/InternalOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/InternalOptions.java new file mode 100644 index 000000000..c321fcf6c --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/InternalOptions.java @@ -0,0 +1,67 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.common.collect.ImmutableMap; +import com.google.firestore.v1.ArrayValue; +import com.google.firestore.v1.MapValue; +import com.google.firestore.v1.Value; + +/** + * Wither style Key/Value options object. + * + *

Basic `wither` functionality built upon `ImmutableMap`. Exposes methods to + * construct, augment, and encode Kay/Value pairs. The wrapped collection `ImmutableMap` is an implementation detail, not to be exposed, since more efficient implementations are + * possible. + */ +final class InternalOptions { + + public static final InternalOptions EMPTY = new InternalOptions(ImmutableMap.of()); + + final ImmutableMap options; + + InternalOptions(ImmutableMap options) { + this.options = options; + } + + public static InternalOptions of(String key, Value value) { + return new InternalOptions(ImmutableMap.of(key, value)); + } + + InternalOptions with(String key, Value value) { + ImmutableMap.Builder builder = + ImmutableMap.builderWithExpectedSize(options.size() + 1); + builder.putAll(options); + builder.put(key, value); + return new InternalOptions(builder.buildKeepingLast()); + } + + InternalOptions with(String key, Iterable values) { + ArrayValue arrayValue = ArrayValue.newBuilder().addAllValues(values).build(); + return with(key, Value.newBuilder().setArrayValue(arrayValue).build()); + } + + InternalOptions with(String key, InternalOptions value) { + return with(key, value.toValue()); + } + + private Value toValue() { + MapValue mapValue = MapValue.newBuilder().putAllFields(options).build(); + return Value.newBuilder().setMapValue(mapValue).build(); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Limit.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Limit.java new file mode 100644 index 000000000..8723b980c --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Limit.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.InternalApi; +import com.google.firestore.v1.Value; +import java.util.Collections; + +@InternalApi +public final class Limit extends Stage { + + private final int limit; + + @InternalApi + public Limit(int limit) { + super("limit", InternalOptions.EMPTY); + this.limit = limit; + } + + @Override + Iterable toStageArgs() { + return Collections.singletonList(encodeValue(limit)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Offset.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Offset.java new file mode 100644 index 000000000..63a96812a --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Offset.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.InternalApi; +import com.google.firestore.v1.Value; +import java.util.Collections; + +@InternalApi +public final class Offset extends Stage { + + private final int offset; + + @InternalApi + public Offset(int offset) { + super("offset", InternalOptions.EMPTY); + this.offset = offset; + } + + @Override + Iterable toStageArgs() { + return Collections.singletonList(encodeValue(offset)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/PipelineExecuteOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/PipelineExecuteOptions.java new file mode 100644 index 000000000..754215e67 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/PipelineExecuteOptions.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +public final class PipelineExecuteOptions extends AbstractOptions { + + public PipelineExecuteOptions() { + super(InternalOptions.EMPTY); + } + + PipelineExecuteOptions(InternalOptions options) { + super(options); + } + + @Override + PipelineExecuteOptions self(InternalOptions options) { + return new PipelineExecuteOptions(options); + } + + public PipelineExecuteOptions withExplainOptions(ExplainOptions options) { + return with("explain_options", options); + } + + public PipelineExecuteOptions withIndexMode(String indexMode) { + return with("index_mode", indexMode); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/RemoveFields.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/RemoveFields.java new file mode 100644 index 000000000..613f1bf0e --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/RemoveFields.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.PipelineUtils; +import com.google.cloud.firestore.pipeline.expressions.Field; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; +import com.google.firestore.v1.Value; + +@InternalApi +public final class RemoveFields extends Stage { + + private final ImmutableList fields; + + @InternalApi + public RemoveFields(ImmutableList fields) { + super("remove_fields", InternalOptions.EMPTY); + this.fields = fields; + } + + @Override + Iterable toStageArgs() { + return Iterables.transform(fields, PipelineUtils::encodeValue); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ReplaceWith.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ReplaceWith.java new file mode 100644 index 000000000..17fbe911d --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ReplaceWith.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.common.collect.ImmutableList; +import com.google.firestore.v1.Value; +import javax.annotation.Nonnull; + +public class ReplaceWith extends Stage { + + private final Expr expr; + private final Mode mode; + + public enum Mode { + FULL_REPLACE(Value.newBuilder().setStringValue("full_replace").build()), + MERGE_PREFER_NEXT(Value.newBuilder().setStringValue("merge_prefer_nest").build()), + MERGE_PREFER_PARENT(Value.newBuilder().setStringValue("merge_prefer_parent").build()); + + public final Value value; + + Mode(Value value) { + this.value = value; + } + } + + public ReplaceWith(@Nonnull Expr field) { + this(field, Mode.FULL_REPLACE); + } + + public ReplaceWith(@Nonnull Expr expr, @Nonnull Mode mode) { + super("replace_with", InternalOptions.EMPTY); + this.expr = expr; + this.mode = mode; + } + + @Override + Iterable toStageArgs() { + return ImmutableList.of(encodeValue(expr), mode.value); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Sample.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Sample.java new file mode 100644 index 000000000..d4a5bd22b --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Sample.java @@ -0,0 +1,69 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.common.collect.ImmutableList; +import com.google.firestore.v1.Value; +import javax.annotation.Nonnull; + +public final class Sample extends Stage { + + private final Number size; + private final Mode mode; + + public enum Mode { + DOCUMENTS(encodeValue("documents")), + PERCENT(encodeValue("percent")); + + public final Value value; + + Mode(Value value) { + this.value = value; + } + } + + @BetaApi + public static Sample withPercentage(double percentage) { + return new Sample(percentage, Mode.PERCENT, new SampleOptions()); + } + + @BetaApi + public static Sample withDocLimit(int documents) { + return new Sample(documents, Mode.DOCUMENTS, new SampleOptions()); + } + + @BetaApi + public Sample withOptions(@Nonnull SampleOptions options) { + return new Sample(size, mode, options); + } + + @InternalApi + private Sample(Number size, Mode mode, SampleOptions options) { + super("sample", options.options); + this.size = size; + this.mode = mode; + } + + @Override + Iterable toStageArgs() { + return ImmutableList.of(encodeValue(size), mode.value); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/SampleOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/SampleOptions.java new file mode 100644 index 000000000..2e88b2802 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/SampleOptions.java @@ -0,0 +1,33 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +public final class SampleOptions extends AbstractOptions { + + public SampleOptions() { + this(InternalOptions.EMPTY); + } + + SampleOptions(InternalOptions options) { + super(options); + } + + @Override + SampleOptions self(InternalOptions options) { + return new SampleOptions(options); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Select.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Select.java new file mode 100644 index 000000000..311608a23 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Select.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.firestore.v1.Value; +import java.util.Collections; +import java.util.Map; + +@InternalApi +public final class Select extends Stage { + + private final Map projections; + + @InternalApi + public Select(Map projections) { + super("select", InternalOptions.EMPTY); + this.projections = projections; + } + + @Override + Iterable toStageArgs() { + return Collections.singletonList(encodeValue(projections)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Sort.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Sort.java new file mode 100644 index 000000000..c89266118 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Sort.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.pipeline.expressions.Ordering; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; +import com.google.firestore.v1.Value; +import java.util.List; + +public final class Sort extends Stage { + + private static final String name = "sort"; + private final List orders; + + @InternalApi + public Sort(ImmutableList orders) { + super("sort", InternalOptions.EMPTY); + this.orders = orders; + } + + @Override + Iterable toStageArgs() { + return Iterables.transform(orders, Ordering::toProto); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Stage.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Stage.java new file mode 100644 index 000000000..8f82195f7 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Stage.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.firestore.v1.Pipeline; +import com.google.firestore.v1.Value; + +/** Parent to all stages. */ +public abstract class Stage { + + protected final String name; + final InternalOptions options; + + /** Constructor is package-private to prevent extension. */ + Stage(String name, InternalOptions options) { + this.name = name; + this.options = options; + } + + final Pipeline.Stage toStageProto() { + return Pipeline.Stage.newBuilder() + .setName(name) + .addAllArgs(toStageArgs()) + .putAllOptions(options.options) + .build(); + } + + abstract Iterable toStageArgs(); +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/StageUtils.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/StageUtils.java new file mode 100644 index 000000000..5381daa50 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/StageUtils.java @@ -0,0 +1,35 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.api.core.InternalApi; +import com.google.common.collect.ImmutableMap; +import com.google.firestore.v1.Value; + +@InternalApi +public final class StageUtils { + @InternalApi + public static com.google.firestore.v1.Pipeline.Stage toStageProto(Stage stage) { + return stage.toStageProto(); + } + + @SuppressWarnings("ReferencesHidden") + @InternalApi + public static ImmutableMap toMap(AbstractOptions options) { + return options.options.options; + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Union.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Union.java new file mode 100644 index 000000000..d54a650f4 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Union.java @@ -0,0 +1,36 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.cloud.firestore.Pipeline; +import com.google.firestore.v1.Value; +import java.util.Collections; + +public final class Union extends Stage { + + private final Pipeline other; + + public Union(Pipeline other) { + super("union", InternalOptions.EMPTY); + this.other = other; + } + + @Override + Iterable toStageArgs() { + return Collections.singletonList(other.toProtoValue()); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Unnest.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Unnest.java new file mode 100644 index 000000000..d94436325 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Unnest.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; +import static com.google.cloud.firestore.pipeline.expressions.Expr.field; + +import com.google.cloud.firestore.pipeline.expressions.AliasedExpr; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.cloud.firestore.pipeline.expressions.Field; +import com.google.cloud.firestore.pipeline.expressions.Selectable; +import com.google.common.collect.ImmutableList; +import com.google.firestore.v1.Value; +import javax.annotation.Nonnull; + +public final class Unnest extends Stage { + + private final Expr expr; + private final Field alias; + + public Unnest(@Nonnull Field field, @Nonnull String alias) { + super("unnest", InternalOptions.EMPTY); + this.expr = field; + this.alias = field(alias); + } + + public Unnest(@Nonnull Field field, @Nonnull String alias, @Nonnull UnnestOptions options) { + super("unnest", options.options); + this.expr = field; + this.alias = field(alias); + } + + public Unnest(@Nonnull Selectable field) { + super("unnest", InternalOptions.EMPTY); + if (field instanceof AliasedExpr) { + this.expr = ((AliasedExpr) field).getExpr(); + this.alias = field(((AliasedExpr) field).getAlias()); + } else { + this.expr = (Field) field; + this.alias = (Field) field; + } + } + + @Override + Iterable toStageArgs() { + return ImmutableList.of(encodeValue(expr), encodeValue(alias)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/UnnestOptions.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/UnnestOptions.java new file mode 100644 index 000000000..1b8e267f0 --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/UnnestOptions.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import com.google.firestore.v1.Value; +import javax.annotation.Nonnull; + +public final class UnnestOptions extends AbstractOptions { + + public UnnestOptions() { + this(InternalOptions.EMPTY); + } + + public UnnestOptions withIndexField(@Nonnull String indexField) { + return with("index_field", Value.newBuilder().setFieldReferenceValue(indexField).build()); + } + + @Override + UnnestOptions self(InternalOptions options) { + return new UnnestOptions(options); + } + + private UnnestOptions(InternalOptions options) { + super(options); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Where.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Where.java new file mode 100644 index 000000000..d7c674f7b --- /dev/null +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Where.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.pipeline.stages; + +import static com.google.cloud.firestore.PipelineUtils.encodeValue; + +import com.google.api.core.InternalApi; +import com.google.cloud.firestore.pipeline.expressions.BooleanExpr; +import com.google.firestore.v1.Value; +import java.util.Collections; + +@InternalApi +public final class Where extends Stage { + + private final BooleanExpr condition; + + @InternalApi + public Where(BooleanExpr condition) { + super("where", InternalOptions.EMPTY); + this.condition = condition; + } + + @Override + Iterable toStageArgs() { + return Collections.singletonList(encodeValue(condition)); + } +} diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/FirestoreRpc.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/FirestoreRpc.java index c2172fafb..5c8dd4572 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/FirestoreRpc.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/FirestoreRpc.java @@ -31,6 +31,8 @@ import com.google.firestore.v1.BeginTransactionResponse; import com.google.firestore.v1.CommitRequest; import com.google.firestore.v1.CommitResponse; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListDocumentsRequest; import com.google.firestore.v1.ListenRequest; @@ -62,6 +64,10 @@ public interface FirestoreRpc extends AutoCloseable, ServiceRpc { /** Runs a query. */ ServerStreamingCallable runQueryCallable(); + /** Executes a pipeline. */ + ServerStreamingCallable + executePipelineCallable(); + /** Runs an aggregation query. */ ServerStreamingCallable runAggregationQueryCallable(); diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java index c391e9b80..3eee842e6 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java @@ -49,6 +49,8 @@ import com.google.firestore.v1.CommitRequest; import com.google.firestore.v1.CommitResponse; import com.google.firestore.v1.DatabaseRootName; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListDocumentsRequest; import com.google.firestore.v1.ListenRequest; @@ -230,6 +232,12 @@ public ServerStreamingCallable runQueryCallab return firestoreStub.runQueryCallable(); } + @Override + public ServerStreamingCallable + executePipelineCallable() { + return firestoreStub.executePipelineCallable(); + } + @Override public ServerStreamingCallable runAggregationQueryCallable() { diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java index 95130776c..844e77efd 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.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. @@ -42,6 +42,8 @@ import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; import com.google.firestore.v1.DocumentMask; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListCollectionIdsResponse; @@ -247,6 +249,16 @@ * * * + *

ExecutePipeline + *

Executes a pipeline query. + * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • executePipelineCallable() + *

+ * + * + * *

RunAggregationQuery *

Runs an aggregation query. *

Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API allows running an aggregation to produce a series of [AggregationResult][google.firestore.v1.AggregationResult] server-side. @@ -1123,6 +1135,34 @@ public final ServerStreamingCallable runQuery return stub.runQueryCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes a pipeline query. + * + *

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 (FirestoreClient firestoreClient = FirestoreClient.create()) {
+   *   ExecutePipelineRequest request =
+   *       ExecutePipelineRequest.newBuilder().setDatabase("database1789464955").build();
+   *   ServerStream stream =
+   *       firestoreClient.executePipelineCallable().call(request);
+   *   for (ExecutePipelineResponse response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable + executePipelineCallable() { + return stub.executePipelineCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Runs an aggregation query. diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java index cd14ac440..6acc3cfa8 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.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. @@ -46,6 +46,8 @@ import com.google.firestore.v1.CreateDocumentRequest; import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListCollectionIdsResponse; @@ -83,7 +85,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 getDocument 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 getDocument: * *

{@code
  * // This snippet has been automatically generated and should be regarded as a code template only.
@@ -99,10 +103,21 @@
  *             .getDocumentSettings()
  *             .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());
  * FirestoreSettings firestoreSettings = firestoreSettingsBuilder.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. */ @Generated("by gapic-generator-java") public class FirestoreSettings extends ClientSettings { @@ -155,6 +170,12 @@ public ServerStreamingCallSettings runQuerySe return ((FirestoreStubSettings) getStubSettings()).runQuerySettings(); } + /** Returns the object with the settings used for calls to executePipeline. */ + public ServerStreamingCallSettings + executePipelineSettings() { + return ((FirestoreStubSettings) getStubSettings()).executePipelineSettings(); + } + /** Returns the object with the settings used for calls to runAggregationQuery. */ public ServerStreamingCallSettings runAggregationQuerySettings() { @@ -356,6 +377,12 @@ public UnaryCallSettings.Builder rollbackSettings() { return getStubSettingsBuilder().runQuerySettings(); } + /** Returns the builder for the settings used for calls to executePipeline. */ + public ServerStreamingCallSettings.Builder + executePipelineSettings() { + return getStubSettingsBuilder().executePipelineSettings(); + } + /** Returns the builder for the settings used for calls to runAggregationQuery. */ public ServerStreamingCallSettings.Builder< RunAggregationQueryRequest, RunAggregationQueryResponse> diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json index 05f7e5a5f..44b5ecb1d 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json @@ -28,6 +28,9 @@ "DeleteDocument": { "methods": ["deleteDocument", "deleteDocument", "deleteDocumentCallable"] }, + "ExecutePipeline": { + "methods": ["executePipelineCallable"] + }, "GetDocument": { "methods": ["getDocument", "getDocumentCallable"] }, diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/package-info.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/package-info.java index b935957ba..10fbf9b1e 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/package-info.java +++ b/google-cloud-firestore/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/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.java index cd1576688..9b9bca6d3 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.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,6 +35,8 @@ import com.google.firestore.v1.CreateDocumentRequest; import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListCollectionIdsResponse; @@ -107,6 +109,11 @@ public ServerStreamingCallable runQueryCallab throw new UnsupportedOperationException("Not implemented: runQueryCallable()"); } + public ServerStreamingCallable + executePipelineCallable() { + throw new UnsupportedOperationException("Not implemented: executePipelineCallable()"); + } + public ServerStreamingCallable runAggregationQueryCallable() { throw new UnsupportedOperationException("Not implemented: runAggregationQueryCallable()"); diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java index 0973180f3..a8d7fce91 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.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. @@ -64,6 +64,8 @@ import com.google.firestore.v1.Cursor; import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListCollectionIdsResponse; @@ -83,9 +85,9 @@ import com.google.firestore.v1.WriteResponse; 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. /** @@ -102,7 +104,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 getDocument 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 getDocument: * *

{@code
  * // This snippet has been automatically generated and should be regarded as a code template only.
@@ -118,10 +122,21 @@
  *             .getDocumentSettings()
  *             .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());
  * FirestoreStubSettings firestoreSettings = firestoreSettingsBuilder.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. */ @Generated("by gapic-generator-java") public class FirestoreStubSettings extends StubSettings { @@ -145,6 +160,8 @@ public class FirestoreStubSettings extends StubSettings { private final UnaryCallSettings commitSettings; private final UnaryCallSettings rollbackSettings; private final ServerStreamingCallSettings runQuerySettings; + private final ServerStreamingCallSettings + executePipelineSettings; private final ServerStreamingCallSettings runAggregationQuerySettings; private final PagedCallSettings< @@ -188,9 +205,7 @@ public String extractNextToken(ListDocumentsResponse payload) { @Override public Iterable extractResources(ListDocumentsResponse payload) { - return payload.getDocumentsList() == null - ? ImmutableList.of() - : payload.getDocumentsList(); + return payload.getDocumentsList(); } }; @@ -225,9 +240,7 @@ public String extractNextToken(PartitionQueryResponse payload) { @Override public Iterable extractResources(PartitionQueryResponse payload) { - return payload.getPartitionsList() == null - ? ImmutableList.of() - : payload.getPartitionsList(); + return payload.getPartitionsList(); } }; @@ -264,9 +277,7 @@ public String extractNextToken(ListCollectionIdsResponse payload) { @Override public Iterable extractResources(ListCollectionIdsResponse payload) { - return payload.getCollectionIdsList() == null - ? ImmutableList.of() - : payload.getCollectionIdsList(); + return payload.getCollectionIdsList(); } }; @@ -371,6 +382,12 @@ public ServerStreamingCallSettings runQuerySe return runQuerySettings; } + /** Returns the object with the settings used for calls to executePipeline. */ + public ServerStreamingCallSettings + executePipelineSettings() { + return executePipelineSettings; + } + /** Returns the object with the settings used for calls to runAggregationQuery. */ public ServerStreamingCallSettings runAggregationQuerySettings() { @@ -529,6 +546,7 @@ protected FirestoreStubSettings(Builder settingsBuilder) throws IOException { commitSettings = settingsBuilder.commitSettings().build(); rollbackSettings = settingsBuilder.rollbackSettings().build(); runQuerySettings = settingsBuilder.runQuerySettings().build(); + executePipelineSettings = settingsBuilder.executePipelineSettings().build(); runAggregationQuerySettings = settingsBuilder.runAggregationQuerySettings().build(); partitionQuerySettings = settingsBuilder.partitionQuerySettings().build(); writeSettings = settingsBuilder.writeSettings().build(); @@ -556,6 +574,9 @@ public static class Builder extends StubSettings.Builder rollbackSettings; private final ServerStreamingCallSettings.Builder runQuerySettings; + private final ServerStreamingCallSettings.Builder< + ExecutePipelineRequest, ExecutePipelineResponse> + executePipelineSettings; private final ServerStreamingCallSettings.Builder< RunAggregationQueryRequest, RunAggregationQueryResponse> runAggregationQuerySettings; @@ -597,6 +618,7 @@ public static class Builder extends StubSettings.BuildernewArrayList())); definitions.put( "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( @@ -624,65 +646,67 @@ public static class Builder extends StubSettings.Builder rollbackSettings() { return runQuerySettings; } + /** Returns the builder for the settings used for calls to executePipeline. */ + public ServerStreamingCallSettings.Builder + executePipelineSettings() { + return executePipelineSettings; + } + /** Returns the builder for the settings used for calls to runAggregationQuery. */ public ServerStreamingCallSettings.Builder< RunAggregationQueryRequest, RunAggregationQueryResponse> diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreCallableFactory.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreCallableFactory.java index 388351bac..2158f1d88 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreCallableFactory.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreCallableFactory.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/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.java index a92d4a5e5..ed33c5069 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.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. @@ -29,6 +29,7 @@ import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; import com.google.firestore.v1.BatchGetDocumentsRequest; import com.google.firestore.v1.BatchGetDocumentsResponse; import com.google.firestore.v1.BatchWriteRequest; @@ -40,6 +41,8 @@ import com.google.firestore.v1.CreateDocumentRequest; import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListCollectionIdsResponse; @@ -79,6 +82,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setFullMethodName("google.firestore.v1.Firestore/GetDocument") .setRequestMarshaller(ProtoUtils.marshaller(GetDocumentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -90,6 +94,7 @@ public class GrpcFirestoreStub extends FirestoreStub { ProtoUtils.marshaller(ListDocumentsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListDocumentsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -100,6 +105,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateDocumentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -110,6 +116,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteDocumentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -121,6 +128,7 @@ public class GrpcFirestoreStub extends FirestoreStub { ProtoUtils.marshaller(BatchGetDocumentsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(BatchGetDocumentsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -132,6 +140,7 @@ public class GrpcFirestoreStub extends FirestoreStub { ProtoUtils.marshaller(BeginTransactionRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(BeginTransactionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor commitMethodDescriptor = @@ -140,6 +149,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setFullMethodName("google.firestore.v1.Firestore/Commit") .setRequestMarshaller(ProtoUtils.marshaller(CommitRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CommitResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor rollbackMethodDescriptor = @@ -148,6 +158,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setFullMethodName("google.firestore.v1.Firestore/Rollback") .setRequestMarshaller(ProtoUtils.marshaller(RollbackRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -157,6 +168,19 @@ public class GrpcFirestoreStub extends FirestoreStub { .setFullMethodName("google.firestore.v1.Firestore/RunQuery") .setRequestMarshaller(ProtoUtils.marshaller(RunQueryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RunQueryResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + executePipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.firestore.v1.Firestore/ExecutePipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(ExecutePipelineRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ExecutePipelineResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -168,6 +192,7 @@ public class GrpcFirestoreStub extends FirestoreStub { ProtoUtils.marshaller(RunAggregationQueryRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(RunAggregationQueryResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -179,6 +204,7 @@ public class GrpcFirestoreStub extends FirestoreStub { ProtoUtils.marshaller(PartitionQueryRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PartitionQueryResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor writeMethodDescriptor = @@ -187,6 +213,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setFullMethodName("google.firestore.v1.Firestore/Write") .setRequestMarshaller(ProtoUtils.marshaller(WriteRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(WriteResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor listenMethodDescriptor = @@ -195,6 +222,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setFullMethodName("google.firestore.v1.Firestore/Listen") .setRequestMarshaller(ProtoUtils.marshaller(ListenRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListenResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -206,6 +234,7 @@ public class GrpcFirestoreStub extends FirestoreStub { ProtoUtils.marshaller(ListCollectionIdsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListCollectionIdsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -215,6 +244,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setFullMethodName("google.firestore.v1.Firestore/BatchWrite") .setRequestMarshaller(ProtoUtils.marshaller(BatchWriteRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(BatchWriteResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -225,6 +255,7 @@ public class GrpcFirestoreStub extends FirestoreStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateDocumentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable getDocumentCallable; @@ -240,6 +271,8 @@ public class GrpcFirestoreStub extends FirestoreStub { private final UnaryCallable commitCallable; private final UnaryCallable rollbackCallable; private final ServerStreamingCallable runQueryCallable; + private final ServerStreamingCallable + executePipelineCallable; private final ServerStreamingCallable runAggregationQueryCallable; private final UnaryCallable partitionQueryCallable; @@ -258,6 +291,11 @@ public class GrpcFirestoreStub extends FirestoreStub { private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; + private static final PathTemplate EXECUTE_PIPELINE_0_PATH_TEMPLATE = + PathTemplate.create("projects/{project_id=*}/**"); + private static final PathTemplate EXECUTE_PIPELINE_1_PATH_TEMPLATE = + PathTemplate.create("projects/*/databases/{database_id=*}/**"); + public static final GrpcFirestoreStub create(FirestoreStubSettings settings) throws IOException { return new GrpcFirestoreStub(settings, ClientContext.create(settings)); } @@ -388,6 +426,20 @@ protected GrpcFirestoreStub( return builder.build(); }) .build(); + GrpcCallSettings + executePipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(executePipelineMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getDatabase(), "project_id", EXECUTE_PIPELINE_0_PATH_TEMPLATE); + builder.add( + request.getDatabase(), "database_id", EXECUTE_PIPELINE_1_PATH_TEMPLATE); + return builder.build(); + }) + .build(); GrpcCallSettings runAggregationQueryTransportSettings = GrpcCallSettings.newBuilder() @@ -495,6 +547,9 @@ protected GrpcFirestoreStub( this.runQueryCallable = callableFactory.createServerStreamingCallable( runQueryTransportSettings, settings.runQuerySettings(), clientContext); + this.executePipelineCallable = + callableFactory.createServerStreamingCallable( + executePipelineTransportSettings, settings.executePipelineSettings(), clientContext); this.runAggregationQueryCallable = callableFactory.createServerStreamingCallable( runAggregationQueryTransportSettings, @@ -590,6 +645,12 @@ public ServerStreamingCallable runQueryCallab return runQueryCallable; } + @Override + public ServerStreamingCallable + executePipelineCallable() { + return executePipelineCallable; + } + @Override public ServerStreamingCallable runAggregationQueryCallable() { diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.java index c123bc7d0..9cc3d5f82 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.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/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.java index badc0f7e8..181c2b19d 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.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. @@ -34,6 +34,7 @@ import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; import com.google.firestore.v1.BatchGetDocumentsRequest; import com.google.firestore.v1.BatchGetDocumentsResponse; import com.google.firestore.v1.BatchWriteRequest; @@ -45,6 +46,8 @@ import com.google.firestore.v1.CreateDocumentRequest; import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListCollectionIdsResponse; @@ -108,7 +111,6 @@ public class HttpJsonFirestoreStub extends FirestoreStub { serializer.putQueryParam(fields, "readTime", request.getReadTime()); serializer.putQueryParam( fields, "transaction", request.getTransaction()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) @@ -155,7 +157,6 @@ public class HttpJsonFirestoreStub extends FirestoreStub { fields, "showMissing", request.getShowMissing()); serializer.putQueryParam( fields, "transaction", request.getTransaction()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) @@ -194,13 +195,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { fields, "currentDocument", request.getCurrentDocument()); serializer.putQueryParam(fields, "mask", request.getMask()); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("document", request.getDocument(), true)) + .toBody("document", request.getDocument(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -233,7 +233,6 @@ public class HttpJsonFirestoreStub extends FirestoreStub { ProtoRestSerializer.create(); serializer.putQueryParam( fields, "currentDocument", request.getCurrentDocument()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) @@ -267,13 +266,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearDatabase().build(), true)) + .toBody("*", request.toBuilder().clearDatabase().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -304,13 +302,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearDatabase().build(), true)) + .toBody("*", request.toBuilder().clearDatabase().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -340,13 +337,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearDatabase().build(), true)) + .toBody("*", request.toBuilder().clearDatabase().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -376,13 +372,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearDatabase().build(), true)) + .toBody("*", request.toBuilder().clearDatabase().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -415,13 +410,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -430,6 +424,42 @@ public class HttpJsonFirestoreStub extends FirestoreStub { .build()) .build(); + private static final ApiMethodDescriptor + executePipelineMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.v1.Firestore/ExecutePipeline") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{database=projects/*/databases/*}/documents:executePipeline", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "database", request.getDatabase()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearDatabase().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExecutePipelineResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor runAggregationQueryMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -454,13 +484,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -493,13 +522,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -532,13 +560,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -569,13 +596,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearDatabase().build(), true)) + .toBody("*", request.toBuilder().clearDatabase().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -610,13 +636,12 @@ public class HttpJsonFirestoreStub extends FirestoreStub { ProtoRestSerializer.create(); serializer.putQueryParam(fields, "documentId", request.getDocumentId()); serializer.putQueryParam(fields, "mask", request.getMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("document", request.getDocument(), true)) + .toBody("document", request.getDocument(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -638,6 +663,8 @@ public class HttpJsonFirestoreStub extends FirestoreStub { private final UnaryCallable commitCallable; private final UnaryCallable rollbackCallable; private final ServerStreamingCallable runQueryCallable; + private final ServerStreamingCallable + executePipelineCallable; private final ServerStreamingCallable runAggregationQueryCallable; private final UnaryCallable partitionQueryCallable; @@ -653,6 +680,11 @@ public class HttpJsonFirestoreStub extends FirestoreStub { private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; + private static final PathTemplate EXECUTE_PIPELINE_0_PATH_TEMPLATE = + PathTemplate.create("projects/{project_id=*}/**"); + private static final PathTemplate EXECUTE_PIPELINE_1_PATH_TEMPLATE = + PathTemplate.create("projects/*/databases/{database_id=*}/**"); + public static final HttpJsonFirestoreStub create(FirestoreStubSettings settings) throws IOException { return new HttpJsonFirestoreStub(settings, ClientContext.create(settings)); @@ -794,6 +826,21 @@ protected HttpJsonFirestoreStub( return builder.build(); }) .build(); + HttpJsonCallSettings + executePipelineTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(executePipelineMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getDatabase(), "project_id", EXECUTE_PIPELINE_0_PATH_TEMPLATE); + builder.add( + request.getDatabase(), "database_id", EXECUTE_PIPELINE_1_PATH_TEMPLATE); + return builder.build(); + }) + .build(); HttpJsonCallSettings runAggregationQueryTransportSettings = HttpJsonCallSettings @@ -887,6 +934,9 @@ protected HttpJsonFirestoreStub( this.runQueryCallable = callableFactory.createServerStreamingCallable( runQueryTransportSettings, settings.runQuerySettings(), clientContext); + this.executePipelineCallable = + callableFactory.createServerStreamingCallable( + executePipelineTransportSettings, settings.executePipelineSettings(), clientContext); this.runAggregationQueryCallable = callableFactory.createServerStreamingCallable( runAggregationQueryTransportSettings, @@ -931,6 +981,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(commitMethodDescriptor); methodDescriptors.add(rollbackMethodDescriptor); methodDescriptors.add(runQueryMethodDescriptor); + methodDescriptors.add(executePipelineMethodDescriptor); methodDescriptors.add(runAggregationQueryMethodDescriptor); methodDescriptors.add(partitionQueryMethodDescriptor); methodDescriptors.add(listCollectionIdsMethodDescriptor); @@ -992,6 +1043,12 @@ public ServerStreamingCallable runQueryCallab return runQueryCallable; } + @Override + public ServerStreamingCallable + executePipelineCallable() { + return executePipelineCallable; + } + @Override public ServerStreamingCallable runAggregationQueryCallable() { diff --git a/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json b/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json index 6d979acf6..3f51dc042 100644 --- a/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json +++ b/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json @@ -359,6 +359,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.RoutingParameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.RubySettings", "queryAllDeclaredConstructors": true, @@ -854,6 +890,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.v1.ExecutePipelineRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.ExecutePipelineRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.ExecutePipelineResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.ExecutePipelineResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.v1.ExecutionStats", "queryAllDeclaredConstructors": true, @@ -926,6 +998,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.v1.ExplainStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.ExplainStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.Function", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.Function$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.v1.GetDocumentRequest", "queryAllDeclaredConstructors": true, @@ -1106,6 +1214,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.v1.Pipeline", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.Pipeline$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.Pipeline$Stage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.Pipeline$Stage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.v1.PlanSummary", "queryAllDeclaredConstructors": true, @@ -1322,6 +1466,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.v1.StructuredPipeline", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.v1.StructuredPipeline$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.v1.StructuredQuery", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/TestUtil.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/TestUtil.java new file mode 100644 index 000000000..7bb671c1d --- /dev/null +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/TestUtil.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore; + +import com.google.firestore.v1.Value; +import java.util.HashMap; +import java.util.Map; + +public final class TestUtil { + public static Map getAggregateSnapshotData(AggregateQuerySnapshot snapshot) { + Map result = new HashMap<>(); + for (Map.Entry entry : snapshot.getData().entrySet()) { + if (entry.getValue().hasIntegerValue()) { + result.put(entry.getKey(), entry.getValue().getIntegerValue()); + } else if (entry.getValue().hasDoubleValue()) { + result.put(entry.getKey(), entry.getValue().getDoubleValue()); + } else if (entry.getValue().hasNullValue()) { + result.put(entry.getKey(), null); + } else { + throw new IllegalArgumentException("AggregateSnapshot has unrecognized value type"); + } + } + + return result; + } +} diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java index 6779edd18..91ab6c88f 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java @@ -30,7 +30,9 @@ import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; -/** @author Eran Leshem */ +/** + * @author Eran Leshem + */ @RunWith(MockitoJUnitRunner.class) public class ToStringTest { diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/TransactionTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/TransactionTest.java index 97bd6a640..6c21b990c 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/TransactionTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/TransactionTest.java @@ -657,8 +657,7 @@ public void getMultipleDocumentsWithFieldMask() throws Exception { BatchGetDocumentsRequest expectedGetAll = getAll(TRANSACTION_ID, doc1.getResourcePath().toString()); expectedGetAll = - expectedGetAll - .toBuilder() + expectedGetAll.toBuilder() .setMask(DocumentMask.newBuilder().addFieldPaths("foo.bar")) .build(); assertEquals(expectedGetAll, requests.get(1)); diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBaseTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBaseTest.java index 54292a00f..3600c53e1 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBaseTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBaseTest.java @@ -51,6 +51,16 @@ public abstract class ITBaseTest { private FirestoreOptions firestoreOptions; private boolean backendPrimed = false; + static String getTargetBackend() { + String targetPropertyName = "FIRESTORE_TARGET_BACKEND"; + String targetBackend = System.getProperty(targetPropertyName); + if (targetBackend == null) { + targetBackend = System.getenv(targetPropertyName); + } + + return targetBackend; + } + @Before public void before() throws Exception { FirestoreOptions.Builder optionsBuilder = FirestoreOptions.newBuilder(); @@ -67,11 +77,7 @@ public void before() throws Exception { logger.log(Level.INFO, "Integration test using default database."); } - String targetPropertyName = "FIRESTORE_TARGET_BACKEND"; - String targetBackend = System.getProperty(targetPropertyName); - if (targetBackend == null) { - targetBackend = System.getenv(targetPropertyName); - } + String targetBackend = getTargetBackend(); TransportChannelProvider defaultProvider = optionsBuilder.build().getTransportChannelProvider(); if (targetBackend != null) { if (targetBackend.equals("PROD")) { @@ -82,8 +88,8 @@ public void before() throws Exception { } else if (targetBackend.equals("NIGHTLY")) { optionsBuilder.setChannelProvider( defaultProvider.withEndpoint("test-firestore.sandbox.googleapis.com:443")); - } else { - throw new IllegalArgumentException("Illegal target backend: " + targetBackend); + } else if (targetBackend.equals("EMULATOR")) { + optionsBuilder.setEmulatorHost("localhost:8080"); } } diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBulkWriterTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBulkWriterTest.java index 8e51d798e..931a28735 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBulkWriterTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITBulkWriterTest.java @@ -83,7 +83,7 @@ public void bulkWriterCreateAddsPrecondition() throws Exception { result.get(); fail("Create operation should have thrown exception"); } catch (Exception e) { - assertTrue(e.getMessage().contains("Document already exists")); + assertTrue(e.getMessage().contains("already exists")); } } @@ -126,7 +126,7 @@ public void bulkWriterUpdateAddsPrecondition() throws Exception { result.get(); fail("Update operation should have thrown exception"); } catch (Exception e) { - assertTrue(e.getMessage().matches(".* No (document|entity) to update.*")); + assertTrue(e.getMessage().contains("to update")); } } diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITE2ETracingTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITE2ETracingTest.java index 7a3c9fc85..c069633c0 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITE2ETracingTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITE2ETracingTest.java @@ -40,6 +40,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeFalse; import com.google.api.gax.rpc.NotFoundException; import com.google.cloud.firestore.BulkWriter; @@ -197,7 +198,7 @@ private boolean dfsContainsCallStack(long spanId, List expectedCallStack if (dfsContainsCallStack( childSpan, expectedCallStack.subList( - /*fromIndexInclusive=*/ 1, /*toIndexExclusive*/ callStackListSize))) { + /* fromIndexInclusive= */ 1, /*toIndexExclusive*/ callStackListSize))) { return true; } } @@ -343,6 +344,10 @@ public void before() throws Exception { "Error instantiating Firestore. Check that the service account credentials " + "were properly set."); + assumeFalse( + "ITTracingTest is not supported against the emulator.", + "EMULATOR".equals(getTargetBackend())); + // Set up the tracer for custom TraceID injection rootSpanName = String.format("%s%d", this.getClass().getSimpleName(), System.currentTimeMillis()); @@ -1133,7 +1138,7 @@ public void transactionTraceTest() throws Exception { fetchAndValidateTrace( customSpanContext.getTraceId(), - /*numExpectedSpans=*/ 11, + /* numExpectedSpans= */ 11, Arrays.asList( Arrays.asList( SPAN_NAME_TRANSACTION_RUN, @@ -1188,7 +1193,7 @@ public void transactionRollbackTraceTest() throws Exception { fetchAndValidateTrace( customSpanContext.getTraceId(), - /*numExpectedSpans=*/ 5, + /* numExpectedSpans= */ 5, Arrays.asList( Arrays.asList( SPAN_NAME_TRANSACTION_RUN, diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java new file mode 100644 index 000000000..67532c5f2 --- /dev/null +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java @@ -0,0 +1,2136 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.it; + +import static com.google.cloud.firestore.it.ITQueryTest.map; +import static com.google.cloud.firestore.it.TestHelper.isRunningAgainstFirestoreEmulator; +import static com.google.cloud.firestore.pipeline.expressions.AggregateFunction.avg; +import static com.google.cloud.firestore.pipeline.expressions.AggregateFunction.count; +import static com.google.cloud.firestore.pipeline.expressions.AggregateFunction.countAll; +import static com.google.cloud.firestore.pipeline.expressions.AggregateFunction.countDistinct; +import static com.google.cloud.firestore.pipeline.expressions.AggregateFunction.countIf; +import static com.google.cloud.firestore.pipeline.expressions.AggregateFunction.sum; +import static com.google.cloud.firestore.pipeline.expressions.Expr.add; +import static com.google.cloud.firestore.pipeline.expressions.Expr.and; +import static com.google.cloud.firestore.pipeline.expressions.Expr.array; +import static com.google.cloud.firestore.pipeline.expressions.Expr.arrayContains; +import static com.google.cloud.firestore.pipeline.expressions.Expr.arrayContainsAll; +import static com.google.cloud.firestore.pipeline.expressions.Expr.arrayContainsAny; +import static com.google.cloud.firestore.pipeline.expressions.Expr.arrayGet; +import static com.google.cloud.firestore.pipeline.expressions.Expr.arrayReverse; +import static com.google.cloud.firestore.pipeline.expressions.Expr.ceil; +import static com.google.cloud.firestore.pipeline.expressions.Expr.cond; +import static com.google.cloud.firestore.pipeline.expressions.Expr.constant; +import static com.google.cloud.firestore.pipeline.expressions.Expr.cosineDistance; +import static com.google.cloud.firestore.pipeline.expressions.Expr.dotProduct; +import static com.google.cloud.firestore.pipeline.expressions.Expr.endsWith; +import static com.google.cloud.firestore.pipeline.expressions.Expr.eq; +import static com.google.cloud.firestore.pipeline.expressions.Expr.eqAny; +import static com.google.cloud.firestore.pipeline.expressions.Expr.euclideanDistance; +import static com.google.cloud.firestore.pipeline.expressions.Expr.exp; +import static com.google.cloud.firestore.pipeline.expressions.Expr.field; +import static com.google.cloud.firestore.pipeline.expressions.Expr.floor; +import static com.google.cloud.firestore.pipeline.expressions.Expr.gt; +import static com.google.cloud.firestore.pipeline.expressions.Expr.ln; +import static com.google.cloud.firestore.pipeline.expressions.Expr.log; +import static com.google.cloud.firestore.pipeline.expressions.Expr.logicalMaximum; +import static com.google.cloud.firestore.pipeline.expressions.Expr.logicalMinimum; +import static com.google.cloud.firestore.pipeline.expressions.Expr.lt; +import static com.google.cloud.firestore.pipeline.expressions.Expr.mapMerge; +import static com.google.cloud.firestore.pipeline.expressions.Expr.mapRemove; +import static com.google.cloud.firestore.pipeline.expressions.Expr.neq; +import static com.google.cloud.firestore.pipeline.expressions.Expr.notEqAny; +import static com.google.cloud.firestore.pipeline.expressions.Expr.nullValue; +import static com.google.cloud.firestore.pipeline.expressions.Expr.or; +import static com.google.cloud.firestore.pipeline.expressions.Expr.pow; +import static com.google.cloud.firestore.pipeline.expressions.Expr.rand; +import static com.google.cloud.firestore.pipeline.expressions.Expr.regexMatch; +import static com.google.cloud.firestore.pipeline.expressions.Expr.round; +import static com.google.cloud.firestore.pipeline.expressions.Expr.sqrt; +import static com.google.cloud.firestore.pipeline.expressions.Expr.startsWith; +import static com.google.cloud.firestore.pipeline.expressions.Expr.strConcat; +import static com.google.cloud.firestore.pipeline.expressions.Expr.strContains; +import static com.google.cloud.firestore.pipeline.expressions.Expr.substring; +import static com.google.cloud.firestore.pipeline.expressions.Expr.subtract; +import static com.google.cloud.firestore.pipeline.expressions.Expr.timestampAdd; +import static com.google.cloud.firestore.pipeline.expressions.Expr.timestampSub; +import static com.google.cloud.firestore.pipeline.expressions.Expr.timestampToUnixMicros; +import static com.google.cloud.firestore.pipeline.expressions.Expr.timestampToUnixMillis; +import static com.google.cloud.firestore.pipeline.expressions.Expr.timestampToUnixSeconds; +import static com.google.cloud.firestore.pipeline.expressions.Expr.unixMicrosToTimestamp; +import static com.google.cloud.firestore.pipeline.expressions.Expr.unixMillisToTimestamp; +import static com.google.cloud.firestore.pipeline.expressions.Expr.unixSecondsToTimestamp; +import static com.google.cloud.firestore.pipeline.expressions.Expr.vector; +import static com.google.cloud.firestore.pipeline.expressions.Expr.vectorLength; +import static com.google.cloud.firestore.pipeline.expressions.Expr.xor; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; +import static org.junit.Assume.assumeFalse; + +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.Timestamp; +import com.google.cloud.firestore.CollectionReference; +import com.google.cloud.firestore.FieldValue; +import com.google.cloud.firestore.Firestore; +import com.google.cloud.firestore.FirestoreOptions; +import com.google.cloud.firestore.GeoPoint; +import com.google.cloud.firestore.LocalFirestoreHelper; +import com.google.cloud.firestore.Pipeline; +import com.google.cloud.firestore.PipelineResult; +import com.google.cloud.firestore.PipelineSnapshot; +import com.google.cloud.firestore.pipeline.expressions.Constant; +import com.google.cloud.firestore.pipeline.expressions.Expr; +import com.google.cloud.firestore.pipeline.expressions.Field; +import com.google.cloud.firestore.pipeline.stages.Aggregate; +import com.google.cloud.firestore.pipeline.stages.AggregateHints; +import com.google.cloud.firestore.pipeline.stages.AggregateOptions; +import com.google.cloud.firestore.pipeline.stages.CollectionHints; +import com.google.cloud.firestore.pipeline.stages.CollectionOptions; +import com.google.cloud.firestore.pipeline.stages.ExplainOptions; +import com.google.cloud.firestore.pipeline.stages.FindNearest; +import com.google.cloud.firestore.pipeline.stages.FindNearestOptions; +import com.google.cloud.firestore.pipeline.stages.GenericOptions; +import com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions; +import com.google.cloud.firestore.pipeline.stages.Sample; +import com.google.cloud.firestore.pipeline.stages.UnnestOptions; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ITPipelineTest extends ITBaseTest { + private CollectionReference collection; + private Map> bookDocs; + + public CollectionReference testCollectionWithDocs(Map> docs) + throws ExecutionException, InterruptedException, TimeoutException { + CollectionReference collection = firestore.collection(LocalFirestoreHelper.autoId()); + for (Map.Entry> doc : docs.entrySet()) { + collection.document(doc.getKey()).set(doc.getValue()).get(5, TimeUnit.SECONDS); + } + return collection; + } + + List> data(List results) { + return results.stream().map(PipelineResult::getData).collect(Collectors.toList()); + } + + @Before + public void setup() throws Exception { + if (collection != null) { + return; + } + + bookDocs = + ImmutableMap.>builder() + .put( + "book1", + ImmutableMap.builder() + .put("title", "The Hitchhiker's Guide to the Galaxy") + .put("author", "Douglas Adams") + .put("genre", "Science Fiction") + .put("published", 1979) + .put("rating", 4.2) + .put("tags", ImmutableList.of("comedy", "space", "adventure")) + .put("awards", ImmutableMap.of("hugo", true, "nebula", false)) + .put( + "embedding", + FieldValue.vector( + new double[] {10.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0})) + .build()) + .put( + "book2", + ImmutableMap.builder() + .put("title", "Pride and Prejudice") + .put("author", "Jane Austen") + .put("genre", "Romance") + .put("published", 1813) + .put("rating", 4.5) + .put("tags", ImmutableList.of("classic", "social commentary", "love")) + .put("awards", ImmutableMap.of("none", true)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 10.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0})) + .build()) + .put( + "book3", + ImmutableMap.builder() + .put("title", "One Hundred Years of Solitude") + .put("author", "Gabriel García Márquez") + .put("genre", "Magical Realism") + .put("published", 1967) + .put("rating", 4.3) + .put("tags", ImmutableList.of("family", "history", "fantasy")) + .put("awards", ImmutableMap.of("nobel", true, "nebula", false)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 10.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0})) + .build()) + .put( + "book4", + ImmutableMap.builder() + .put("title", "The Lord of the Rings") + .put("author", "J.R.R. Tolkien") + .put("genre", "Fantasy") + .put("published", 1954) + .put("rating", 4.7) + .put("tags", ImmutableList.of("adventure", "magic", "epic")) + .put("awards", ImmutableMap.of("hugo", false, "nebula", false)) + .put("cost", Double.NaN) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 1.0, 10.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0})) + .build()) + .put( + "book5", + ImmutableMap.builder() + .put("title", "The Handmaid's Tale") + .put("author", "Margaret Atwood") + .put("genre", "Dystopian") + .put("published", 1985) + .put("rating", 4.1) + .put("tags", ImmutableList.of("feminism", "totalitarianism", "resistance")) + .put("awards", ImmutableMap.of("arthur c. clarke", true, "booker prize", false)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 1.0, 1.0, 10.0, 1.0, 1.0, 1.0, 1.0, 1.0})) + .build()) + .put( + "book6", + ImmutableMap.builder() + .put("title", "Crime and Punishment") + .put("author", "Fyodor Dostoevsky") + .put("genre", "Psychological Thriller") + .put("published", 1866) + .put("rating", 4.3) + .put("tags", ImmutableList.of("philosophy", "crime", "redemption")) + .put("awards", ImmutableMap.of("none", true)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 1.0, 1.0, 1.0, 10.0, 1.0, 1.0, 1.0, 1.0})) + .build()) + .put( + "book7", + ImmutableMap.builder() + .put("title", "To Kill a Mockingbird") + .put("author", "Harper Lee") + .put("genre", "Southern Gothic") + .put("published", 1960) + .put("rating", 4.2) + .put("tags", ImmutableList.of("racism", "injustice", "coming-of-age")) + .put("awards", ImmutableMap.of("pulitzer", true)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 10.0, 1.0, 1.0, 1.0})) + .build()) + .put( + "book8", + ImmutableMap.builder() + .put("title", "1984") + .put("author", "George Orwell") + .put("genre", "Dystopian") + .put("published", 1949) + .put("rating", 4.2) + .put("tags", ImmutableList.of("surveillance", "totalitarianism", "propaganda")) + .put("awards", ImmutableMap.of("prometheus", true)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 10.0, 1.0, 1.0})) + .build()) + .put( + "book9", + ImmutableMap.builder() + .put("title", "The Great Gatsby") + .put("author", "F. Scott Fitzgerald") + .put("genre", "Modernist") + .put("published", 1925) + .put("rating", 4.0) + .put("tags", ImmutableList.of("wealth", "american dream", "love")) + .put("awards", ImmutableMap.of("none", true)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 10.0, 1.0})) + .build()) + .put( + "book10", + ImmutableMap.builder() + .put("title", "Dune") + .put("author", "Frank Herbert") + .put("genre", "Science Fiction") + .put("published", 1965) + .put("rating", 4.6) + .put("tags", ImmutableList.of("politics", "desert", "ecology")) + .put("awards", ImmutableMap.of("hugo", true, "nebula", true)) + .put( + "embedding", + FieldValue.vector( + new double[] {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 10.0})) + .build()) + .put( + "book11", + ImmutableMap.builder() + .put("title", "Timestamp Book") + .put("author", "Timestamp Author") + .put("timestamp", new Date()) + .build()) + .build(); + collection = testCollectionWithDocs(bookDocs); + } + + @Test + public void testAllDataTypes() throws Exception { + Date refDate = new Date(); + Timestamp refTimestamp = Timestamp.now(); + GeoPoint refGeoPoint = new GeoPoint(1, 2); + byte[] refBytes = new byte[] {1, 2, 3}; + double[] refVector = new double[] {1.0, 2.0, 3.0}; + + Map refMap = + map( + "number", + 1, + "string", + "a string", + "boolean", + true, + "null", + null, + "geoPoint", + refGeoPoint, + "timestamp", + refTimestamp, + "date", + Timestamp.of(refDate), + "bytes", + com.google.cloud.firestore.Blob.fromBytes(refBytes), + "vector", + FieldValue.vector(refVector)); + + List refArray = + Lists.newArrayList( + 1, + "a string", + true, + null, + refTimestamp, + refGeoPoint, + Timestamp.of(refDate), + com.google.cloud.firestore.Blob.fromBytes(refBytes), + FieldValue.vector(refVector)); + + Pipeline pipeline = + firestore + .pipeline() + .collection(collection.getPath()) + .limit(1) + .select( + constant(1L).as("number"), + constant("a string").as("string"), + constant(true).as("boolean"), + nullValue().as("null"), + constant(refTimestamp).as("timestamp"), + constant(refDate).as("date"), + constant(refGeoPoint).as("geoPoint"), + constant(com.google.cloud.firestore.Blob.fromBytes(refBytes)).as("bytes"), + Constant.vector(refVector).as("vector"), + Expr.map(refMap).as("map"), + array(refArray).as("array")); + + List results = pipeline.execute().get().getResults(); + assertThat(results).hasSize(1); + Map data = results.get(0).getData(); + + assertThat(data.get("number")).isEqualTo(1L); + assertThat(data.get("string")).isEqualTo("a string"); + assertThat(data.get("boolean")).isEqualTo(true); + assertThat(data.get("null")).isNull(); + assertThat(data.get("geoPoint")).isEqualTo(refGeoPoint); + assertThat(data.get("timestamp")).isEqualTo(refTimestamp); + assertThat(data.get("date")).isEqualTo(Timestamp.of(refDate)); + assertThat(data.get("bytes")).isEqualTo(com.google.cloud.firestore.Blob.fromBytes(refBytes)); + assertThat(data.get("vector")).isEqualTo(FieldValue.vector(refVector)); + assertThat(stringOfOrderedKeyValues((Map) data.get("map"))) + .isEqualTo(stringOfOrderedKeyValues(refMap)); + assertThat(data.get("array").toString()).isEqualTo(refArray.toString()); + } + + private String stringOfOrderedKeyValues(Map map) { + return map.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .map(e -> e.getKey() + "=" + e.getValue()) + .collect(Collectors.joining(", ")); + } + + @Test + public void testResultMetadata() throws Exception { + Pipeline pipeline = firestore.pipeline().collection(collection.getPath()); + PipelineSnapshot snapshot = pipeline.execute().get(); + assertThat(snapshot.getExecutionTime()).isNotNull(); + + for (PipelineResult result : snapshot.getResults()) { + assertThat(result.getCreateTime()).isAtMost(result.getUpdateTime()); + assertThat(result.getUpdateTime()).isLessThan(result.getExecutionTime()); + } + + collection.document("book1").update("rating", 5.0).get(); + snapshot = pipeline.where(eq("title", "The Hitchhiker's Guide to the Galaxy")).execute().get(); + for (PipelineResult result : snapshot.getResults()) { + assertThat(result.getCreateTime()).isLessThan(result.getUpdateTime()); + } + } + + @Test + public void testResultIsEqual() throws Exception { + Pipeline pipeline = + firestore.pipeline().collection(collection.getPath()).sort(field("title").ascending()); + PipelineSnapshot snapshot1 = pipeline.limit(1).execute().get(); + PipelineSnapshot snapshot2 = pipeline.limit(1).execute().get(); + PipelineSnapshot snapshot3 = pipeline.offset(1).limit(1).execute().get(); + + assertThat(snapshot1.getResults()).hasSize(1); + assertThat(snapshot2.getResults()).hasSize(1); + assertThat(snapshot3.getResults()).hasSize(1); + assertThat(snapshot1.getResults().get(0)).isEqualTo(snapshot2.getResults().get(0)); + assertThat(snapshot1.getResults().get(0)).isNotEqualTo(snapshot3.getResults().get(0)); + } + + @Test + public void testEmptyResultMetadata() throws Exception { + Pipeline pipeline = firestore.pipeline().collection(collection.getPath()).limit(0); + PipelineSnapshot snapshot = pipeline.execute().get(); + assertThat(snapshot.getResults()).isEmpty(); + assertThat(snapshot.getExecutionTime()).isNotNull(); + // Ensure execution time is recent, within a tolerance. + long now = Timestamp.now().toDate().getTime(); + long executionTime = snapshot.getExecutionTime().toDate().getTime(); + assertThat(now - executionTime).isLessThan(3000); // 3 seconds tolerance + } + + @Test + public void testAggregateResultMetadata() throws Exception { + Pipeline pipeline = + firestore.pipeline().collection(collection.getPath()).aggregate(countAll().as("count")); + PipelineSnapshot snapshot = pipeline.execute().get(); + assertThat(snapshot.getResults()).hasSize(1); + assertThat(snapshot.getExecutionTime()).isNotNull(); + + PipelineResult aggregateResult = snapshot.getResults().get(0); + assertThat(aggregateResult.getCreateTime()).isEqualTo(Timestamp.ofTimeSecondsAndNanos(0, 0)); + assertThat(aggregateResult.getUpdateTime()).isEqualTo(Timestamp.ofTimeSecondsAndNanos(0, 0)); + + // Ensure execution time is recent, within a tolerance. + long now = Timestamp.now().toDate().getTime(); + long executionTime = snapshot.getExecutionTime().toDate().getTime(); + assertThat(now - executionTime).isLessThan(3000); // 3 seconds tolerance + } + + @Test + public void testAggregates() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .aggregate(countAll().as("count")) + .execute() + .get() + .getResults(); + assertThat(data(results)).isEqualTo(Lists.newArrayList(map("count", 11L))); + + results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("genre", "Science Fiction")) + .aggregate( + countAll().as("count"), + avg("rating").as("avg_rating"), + field("rating").maximum().as("max_rating")) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo(Lists.newArrayList(map("count", 2L, "avg_rating", 4.4, "max_rating", 4.6))); + } + + @Test + public void testMoreAggregates() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .aggregate( + sum("rating").as("sum_rating"), + count("rating").as("count_rating"), + countDistinct("genre").as("distinct_genres")) + .execute() + .get() + .getResults(); + Map result = data(results).get(0); + assertThat((Double) result.get("sum_rating")).isWithin(0.00001).of(43.1); + assertThat(result.get("count_rating")).isEqualTo(10L); + assertThat(result.get("distinct_genres")).isEqualTo(8L); + } + + @Test + public void testCountIfAggregate() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .aggregate(countIf(gt(field("rating"), 4.3)).as("count")) + .execute() + .get() + .getResults(); + assertThat(data(results)).isEqualTo(Lists.newArrayList(map("count", 3L))); + } + + @Test + public void testGroupBysWithoutAccumulators() throws Exception { + assertThrows( + IllegalArgumentException.class, + () -> { + firestore + .pipeline() + .createFrom(collection) + .where(lt("published", 1900)) + .aggregate(Aggregate.withAccumulators().withGroups("genre")); + }); + } + + @Test + public void testDistinct() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(lt("published", 1900)) + .distinct(field("genre").toLower().as("lower_genre")) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .containsExactly( + map("lower_genre", "romance"), map("lower_genre", "psychological thriller")); + } + + @Test + public void testGroupBysAndAggregate() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(lt("published", 1984)) + .aggregate( + Aggregate.withAccumulators(avg("rating").as("avg_rating")).withGroups("genre")) + .where(gt("avg_rating", 4.3)) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .containsExactly( + map("avg_rating", 4.7, "genre", "Fantasy"), + map("avg_rating", 4.5, "genre", "Romance"), + map("avg_rating", 4.4, "genre", "Science Fiction")); + } + + @Test + public void testMinMax() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .aggregate( + countAll().as("count"), + field("rating").maximum().as("max_rating"), + field("published").minimum().as("min_published")) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "count", 11L, + "max_rating", 4.7, + "min_published", 1813L))); + } + + @Test + public void selectSpecificFields() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .select("title", "author") + .sort(field("author").ascending()) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "The Hitchhiker's Guide to the Galaxy", "author", "Douglas Adams"), + map("title", "The Great Gatsby", "author", "F. Scott Fitzgerald"), + map("title", "Dune", "author", "Frank Herbert"), + map("title", "Crime and Punishment", "author", "Fyodor Dostoevsky"), + map("title", "One Hundred Years of Solitude", "author", "Gabriel García Márquez"), + map("title", "1984", "author", "George Orwell"), + map("title", "To Kill a Mockingbird", "author", "Harper Lee"), + map("title", "The Lord of the Rings", "author", "J.R.R. Tolkien"), + map("title", "Pride and Prejudice", "author", "Jane Austen"), + map("title", "The Handmaid's Tale", "author", "Margaret Atwood"), + map("title", "Timestamp Book", "author", "Timestamp Author"))); + } + + @Test + public void addAndRemoveFields() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .where(field("author").neq("Timestamp Author")) + .addFields( + strConcat(field("author"), "_", field("title")).as("author_title"), + strConcat(field("title"), "_", field("author")).as("title_author")) + .removeFields("title_author", "tags", "awards", "rating", "title", "embedding", "cost") + .removeFields(field("published"), field("genre"), field("nestedField")) + .sort(field("author_title").ascending()) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "author_title", + "Douglas Adams_The Hitchhiker's Guide to the Galaxy", + "author", + "Douglas Adams"), + map( + "author_title", + "F. Scott Fitzgerald_The Great Gatsby", + "author", + "F. Scott Fitzgerald"), + map("author_title", "Frank Herbert_Dune", "author", "Frank Herbert"), + map( + "author_title", + "Fyodor Dostoevsky_Crime and Punishment", + "author", + "Fyodor Dostoevsky"), + map( + "author_title", + "Gabriel García Márquez_One Hundred Years of Solitude", + "author", + "Gabriel García Márquez"), + map("author_title", "George Orwell_1984", "author", "George Orwell"), + map("author_title", "Harper Lee_To Kill a Mockingbird", "author", "Harper Lee"), + map( + "author_title", + "J.R.R. Tolkien_The Lord of the Rings", + "author", + "J.R.R. Tolkien"), + map("author_title", "Jane Austen_Pride and Prejudice", "author", "Jane Austen"), + map( + "author_title", + "Margaret Atwood_The Handmaid's Tale", + "author", + "Margaret Atwood"))); + } + + @Test + public void whereByMultipleConditions() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(and(gt("rating", 4.5), eq("genre", "Science Fiction"))) + .execute() + .get() + .getResults(); + + // It's Dune + assertThat(data(results)) + .isEqualTo(Lists.newArrayList(collection.document("book10").get().get().getData())); + assertThat(results.get(0).getReference()).isEqualTo(collection.document("book10")); + } + + @Test + public void whereByOrCondition() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(or(eq("genre", "Romance"), eq("genre", "Dystopian"))) + .select("title") + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "Pride and Prejudice"), + map("title", "The Handmaid's Tale"), + map("title", "1984"))); + } + + @Test + public void testPipelineWithOffsetAndLimit() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .sort(field("author").ascending()) + .offset(5) + .limit(3) + .select("title", "author") + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "1984", "author", "George Orwell"), + map("title", "To Kill a Mockingbird", "author", "Harper Lee"), + map("title", "The Lord of the Rings", "author", "J.R.R. Tolkien"))); + } + + @Test + public void testArrayContains() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(arrayContains("tags", "comedy")) + .execute() + .get() + .getResults(); + assertThat(data(results)) + // The Hitchhiker's Guide to the Galaxy + .isEqualTo(Lists.newArrayList(collection.document("book1").get().get().getData())); + } + + @Test + public void testArrayContainsAny() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(arrayContainsAny("tags", Lists.newArrayList("comedy", "classic"))) + .select("title") + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "The Hitchhiker's Guide to the Galaxy"), + map("title", "Pride and Prejudice"))); + } + + @Test + public void testArrayContainsAll() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(arrayContainsAll("tags", Lists.newArrayList("adventure", "magic"))) + .select("title") + .execute() + .get() + .getResults(); + + assertThat(data(results)).isEqualTo(Lists.newArrayList(map("title", "The Lord of the Rings"))); + } + + @Test + public void testArrayLength() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("tags").arrayLength().as("tagsCount")) + .where(eq("tagsCount", 3)) + .execute() + .get() + .getResults(); + + // All documents have 3 tags in the test dataset + assertThat(data(results)).hasSize(10); + } + + @Test + public void testArrayConcat() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("tags").arrayConcat(array("newTag1", "newTag2")).as("modifiedTags")) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "modifiedTags", + Lists.newArrayList("comedy", "space", "adventure", "newTag1", "newTag2")))); + } + + @Test + public void testStrConcat() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select(strConcat(field("author"), " - ", field("title")).as("bookInfo")) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("bookInfo", "Douglas Adams - The Hitchhiker's Guide to the Galaxy"))); + } + + @Test + public void testStartsWith() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(startsWith("title", "The")) + .select("title") + .sort(field("title").ascending()) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "The Great Gatsby"), + map("title", "The Handmaid's Tale"), + map("title", "The Hitchhiker's Guide to the Galaxy"), + map("title", "The Lord of the Rings"))); + } + + @Test + public void testEndsWith() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(endsWith(field("title"), constant("y"))) + .select("title") + .sort(field("title").descending()) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "The Hitchhiker's Guide to the Galaxy"), + map("title", "The Great Gatsby"))); + } + + @Test + public void testLength() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("title").charLength().as("titleLength"), field("title")) + .where(gt("titleLength", 21)) + .sort(field("titleLength").descending()) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("titleLength", 36L, "title", "The Hitchhiker's Guide to the Galaxy"), + map("titleLength", 29L, "title", "One Hundred Years of Solitude"))); + } + + @Test + public void testStringFunctions() throws Exception { + List results; + + // Reverse + results = + firestore + .pipeline() + .collection(collection.getPath()) + .select(field("title").strReverse().as("reversed_title"), field("author")) + .where(field("author").eq("Douglas Adams")) + .execute() + .get() + .getResults(); + assertThat(data(results).get(0).get("reversed_title")) + .isEqualTo("yxalaG eht ot ediuG s'rekihhctiH ehT"); + + // CharLength + results = + firestore + .pipeline() + .createFrom(collection) + .select(field("title").charLength().as("title_length"), field("author")) + .where(field("author").eq("Douglas Adams")) + .execute() + .get() + .getResults(); + assertThat(data(results).get(0).get("title_length")).isEqualTo(36L); + + // ByteLength + results = + firestore + .pipeline() + .createFrom(collection) + .select( + field("author"), + field("title").strConcat("_银河系漫游指南").byteLength().as("title_byte_length")) + .where(field("author").eq("Douglas Adams")) + .execute() + .get() + .getResults(); + assertThat(data(results).get(0).get("title_byte_length")).isEqualTo(58L); + } + + @Test + public void testToLowercase() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("title").toLower().as("lowercaseTitle")) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList(map("lowercaseTitle", "the hitchhiker's guide to the galaxy"))); + } + + @Test + public void testToUppercase() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("author").toUpper().as("uppercaseAuthor")) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo(Lists.newArrayList(map("uppercaseAuthor", "DOUGLAS ADAMS"))); + } + + @Test + public void testTrim() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .addFields(strConcat(constant(" "), field("title"), constant(" ")).as("spacedTitle")) + .select(field("spacedTitle").trim().as("trimmedTitle"), field("spacedTitle")) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "spacedTitle", " The Hitchhiker's Guide to the Galaxy ", + "trimmedTitle", "The Hitchhiker's Guide to the Galaxy"))); + } + + @Test + public void testLike() throws Exception { + assumeFalse( + "LIKE is not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + + List results = + firestore + .pipeline() + .createFrom(collection) + .where(field("title").like("%Guide%")) + .select("title") + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo(Lists.newArrayList(map("title", "The Hitchhiker's Guide to the Galaxy"))); + } + + @Test + public void testRegexContains() throws Exception { + assumeFalse( + "LIKE is not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + // Find titles that contain either "the" or "of" (case-insensitive) + List results = + firestore + .pipeline() + .createFrom(collection) + .where(field("title").regexContains("(?i)(the|of)")) + .execute() + .get() + .getResults(); + + assertThat(data(results)).hasSize(5); + } + + @Test + public void testRegexMatches() throws Exception { + assumeFalse( + "LIKE is not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + // Find titles that contain either "the" or "of" (case-insensitive) + List results = + firestore + .pipeline() + .createFrom(collection) + .where(regexMatch("title", ".*(?i)(the|of).*")) + .execute() + .get() + .getResults(); + + assertThat(data(results)).hasSize(5); + } + + @Test + public void testArithmeticOperations() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select( + add(field("rating"), 1).as("ratingPlusOne"), + subtract(field("published"), 1900).as("yearsSince1900"), + field("rating").multiply(10).as("ratingTimesTen"), + field("rating").divide(2).as("ratingDividedByTwo")) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "ratingPlusOne", + 5.2, + "yearsSince1900", + 79L, + "ratingTimesTen", + 42.0, + "ratingDividedByTwo", + 2.1))); + } + + @Test + public void testComparisonOperators() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where( + and(gt("rating", 4.2), field("rating").lte(4.5), neq("genre", "Science Fiction"))) + .select("rating", "title") + .sort(field("title").ascending()) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("rating", 4.3, "title", "Crime and Punishment"), + map("rating", 4.3, "title", "One Hundred Years of Solitude"), + map("rating", 4.5, "title", "Pride and Prejudice"))); + } + + @Test + public void testLogicalAndComparisonOperators() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where( + xor( + eq("genre", "Romance"), + eq("genre", "Dystopian"), + eq("genre", "Fantasy"), + eq("published", 1949))) + .select("title") + .execute() + .get() + .getResults(); + assertThat(data(results)) + .containsExactly( + map("title", "Pride and Prejudice"), + map("title", "The Lord of the Rings"), + map("title", "The Handmaid's Tale")); + + results = + firestore + .pipeline() + .createFrom(collection) + .where(eqAny("genre", Lists.newArrayList("Romance", "Dystopian"))) + .select("title") + .execute() + .get() + .getResults(); + assertThat(data(results)) + .containsExactly( + map("title", "Pride and Prejudice"), + map("title", "The Handmaid's Tale"), + map("title", "1984")); + + results = + firestore + .pipeline() + .createFrom(collection) + .where(notEqAny("genre", Lists.newArrayList("Romance", "Dystopian"))) + .select("genre") + .distinct("genre") + .execute() + .get() + .getResults(); + assertThat(data(results)) + .containsExactly( + map("genre", "Science Fiction"), + map("genre", "Magical Realism"), + map("genre", "Fantasy"), + map("genre", "Psychological Thriller"), + map("genre", "Southern Gothic"), + map("genre", "Modernist")); + } + + @Test + public void testCondExpression() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(field("title").neq("Timestamp Book")) + .select( + cond(gt(field("published"), 1980), "Modern", "Classic").as("era"), + field("title"), + field("published")) + .sort(field("published").ascending()) + .limit(2) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("era", "Classic", "title", "Pride and Prejudice", "published", 1813L), + map("era", "Classic", "title", "Crime and Punishment", "published", 1866L))); + } + + @Test + public void testLogicalOperators() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where( + or(and(gt("rating", 4.5), eq("genre", "Science Fiction")), lt("published", 1900))) + .select("title") + .sort(field("title").ascending()) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "Crime and Punishment"), + map("title", "Dune"), + map("title", "Pride and Prejudice"))); + } + + @Test + public void testChecks() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .sort(field("rating").descending()) + .limit(1) + .select( + field("rating").isNull().as("ratingIsNull"), + field("rating").isNaN().as("ratingIsNaN"), + arrayGet("title", 0).isError().as("isError"), + arrayGet("title", 0).ifError(constant("was error")).as("ifError"), + field("foo").isAbsent().as("isAbsent"), + field("title").isNotNull().as("titleIsNotNull"), + field("cost").isNotNaN().as("costIsNotNan"), + field("fooBarBaz").exists().as("fooBarBazExists"), + field("title").exists().as("titleExists")) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "ratingIsNull", + false, + "ratingIsNaN", + false, + "isError", + true, + "ifError", + "was error", + "isAbsent", + true, + "titleIsNotNull", + true, + "costIsNotNan", + false, + "fooBarBazExists", + false, + "titleExists", + true))); + } + + @Test + public void testLogicalMinMax() throws Exception { + List results; + + // logicalMax + results = + firestore + .pipeline() + .createFrom(collection) + .where(field("author").eq("Douglas Adams")) + .select( + field("rating").logicalMaximum(4.5).as("max_rating"), + logicalMaximum(field("published"), 1900).as("max_published")) + .execute() + .get() + .getResults(); + assertThat(data(results)).containsExactly(map("max_rating", 4.5, "max_published", 1979L)); + + // logicalMin + results = + firestore + .pipeline() + .createFrom(collection) + .where(field("author").eq("Douglas Adams")) + .select( + field("rating").logicalMinimum(4.5).as("min_rating"), + logicalMinimum(field("published"), 1900).as("min_published")) + .execute() + .get() + .getResults(); + assertThat(data(results)).containsExactly(map("min_rating", 4.2, "min_published", 1900L)); + } + + @Test + public void testMapGet() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("awards").mapGet("hugo").as("hugoAward"), field("title")) + .where(eq("hugoAward", true)) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("hugoAward", true, "title", "The Hitchhiker's Guide to the Galaxy"), + map("hugoAward", true, "title", "Dune"))); + } + + @Test + public void testDataManipulationExpressions() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "Timestamp Book")) + .select( + timestampAdd(field("timestamp"), "day", 1).as("timestamp_plus_day"), + timestampSub(field("timestamp"), "hour", 1).as("timestamp_minus_hour")) + .execute() + .get() + .getResults(); + assertThat(results).hasSize(1); + Date originalTimestamp = (Date) bookDocs.get("book11").get("timestamp"); + Timestamp timestampPlusDay = (Timestamp) results.get(0).getData().get("timestamp_plus_day"); + Timestamp timestampMinusHour = (Timestamp) results.get(0).getData().get("timestamp_minus_hour"); + assertThat(timestampPlusDay.toDate().getTime() - originalTimestamp.getTime()) + .isEqualTo(24 * 60 * 60 * 1000); + assertThat(originalTimestamp.getTime() - timestampMinusHour.toDate().getTime()) + .isEqualTo(60 * 60 * 1000); + + results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "The Hitchhiker's Guide to the Galaxy")) + .select( + arrayGet("tags", 1).as("second_tag"), + mapMerge(field("awards"), Expr.map(map("new_award", true))).as("merged_awards")) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "second_tag", + "space", + "merged_awards", + map("hugo", true, "nebula", false, "new_award", true)))); + + results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "The Hitchhiker's Guide to the Galaxy")) + .select( + arrayReverse("tags").as("reversed_tags"), + mapRemove(field("awards"), "nebula").as("removed_awards")) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "reversed_tags", + Lists.newArrayList("adventure", "space", "comedy"), + "removed_awards", + map("hugo", true)))); + } + + @Test + public void testMathExpressions() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "The Hitchhiker's Guide to the Galaxy")) + .select( + ceil(field("rating")).as("ceil_rating"), + floor(field("rating")).as("floor_rating"), + pow(field("rating"), 2).as("pow_rating"), + round(field("rating")).as("round_rating"), + sqrt(field("rating")).as("sqrt_rating"), + field("published").mod(10).as("mod_published")) + .execute() + .get() + .getResults(); + Map result = data(results).get(0); + assertThat((Double) result.get("ceil_rating")).isEqualTo(5.0); + assertThat((Double) result.get("floor_rating")).isEqualTo(4.0); + assertThat((Double) result.get("pow_rating")).isWithin(0.00001).of(17.64); + assertThat((Double) result.get("round_rating")).isEqualTo(4.0); + assertThat((Double) result.get("sqrt_rating")).isWithin(0.00001).of(2.04939); + assertThat((Long) result.get("mod_published")).isEqualTo(9L); + } + + @Test + public void testAdvancedMathExpressions() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "The Lord of the Rings")) + .select( + exp(field("rating")).as("exp_rating"), + ln(field("rating")).as("ln_rating"), + log(field("rating"), 10).as("log_rating")) + .execute() + .get() + .getResults(); + Map result = data(results).get(0); + assertThat((Double) result.get("exp_rating")).isWithin(0.00001).of(109.94717); + assertThat((Double) result.get("ln_rating")).isWithin(0.00001).of(1.54756); + assertThat((Double) result.get("log_rating")).isWithin(0.00001).of(0.67209); + } + + @Test + public void testTimestampConversions() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .limit(1) + .select( + unixSecondsToTimestamp(constant(1741380235L)).as("unixSecondsToTimestamp"), + unixMillisToTimestamp(constant(1741380235123L)).as("unixMillisToTimestamp"), + unixMicrosToTimestamp(constant(1741380235123456L)).as("unixMicrosToTimestamp"), + timestampToUnixSeconds( + constant(Timestamp.ofTimeSecondsAndNanos(1741380235L, 123456789))) + .as("timestampToUnixSeconds"), + timestampToUnixMicros( + constant(Timestamp.ofTimeSecondsAndNanos(1741380235L, 123456789))) + .as("timestampToUnixMicros"), + timestampToUnixMillis( + constant(Timestamp.ofTimeSecondsAndNanos(1741380235L, 123456789))) + .as("timestampToUnixMillis")) + .execute() + .get() + .getResults(); + Map result = data(results).get(0); + assertThat(result.get("unixSecondsToTimestamp")) + .isEqualTo(Timestamp.ofTimeSecondsAndNanos(1741380235L, 0)); + assertThat(result.get("unixMillisToTimestamp")) + .isEqualTo(Timestamp.ofTimeSecondsAndNanos(1741380235L, 123000000)); + assertThat(result.get("unixMicrosToTimestamp")) + .isEqualTo(Timestamp.ofTimeSecondsAndNanos(1741380235L, 123456000)); + assertThat(result.get("timestampToUnixSeconds")).isEqualTo(1741380235L); + assertThat(result.get("timestampToUnixMicros")).isEqualTo(1741380235123456L); + assertThat(result.get("timestampToUnixMillis")).isEqualTo(1741380235123L); + } + + @Test + public void testRand() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .limit(10) + .select(rand().as("result")) + .execute() + .get() + .getResults(); + assertThat(results).hasSize(10); + for (PipelineResult result : results) { + Double randVal = (Double) result.getData().get("result"); + assertThat(randVal).isAtLeast(0.0); + assertThat(randVal).isLessThan(1.0); + } + } + + @Test + public void testVectorLength() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .limit(1) + .select(vectorLength(Constant.vector(new double[] {1.0, 2.0, 3.0})).as("vectorLength")) + .execute() + .get() + .getResults(); + assertThat(data(results)).isEqualTo(Lists.newArrayList(map("vectorLength", 3L))); + } + + @Test + public void testStrContains() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(strContains(field("title"), "'s")) + .select("title") + .sort(field("title").ascending()) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .containsExactly( + map("title", "The Handmaid's Tale"), + map("title", "The Hitchhiker's Guide to the Galaxy")); + } + + @Test + public void testSubstring() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "The Lord of the Rings")) + .select( + substring(field("title"), constant(9), constant(2)).as("of"), + substring("title", 16, 5).as("Rings")) + .execute() + .get() + .getResults(); + assertThat(data(results)).isEqualTo(Lists.newArrayList(map("of", "of", "Rings", "Rings"))); + } + + @Test + public void testDistanceFunctions() throws Exception { + double[] sourceVector = {0.1, 0.1}; + double[] targetVector = {0.5, 0.8}; + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .select( + cosineDistance(Constant.vector(sourceVector), targetVector).as("cosineDistance"), + dotProduct(Constant.vector(sourceVector), targetVector).as("dotProductDistance"), + euclideanDistance(Constant.vector(sourceVector), targetVector) + .as("euclideanDistance")) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "cosineDistance", 0.02560880430538015, + "dotProductDistance", 0.13, + "euclideanDistance", 0.806225774829855))); + } + + @Test + public void testNestedFields() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("awards.hugo", true)) + .select("title", "awards.hugo") + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "The Hitchhiker's Guide to the Galaxy", "awards.hugo", true), + map("title", "Dune", "awards.hugo", true))); + } + + @Test + public void testPipelineInTransactions() throws Exception { + assumeFalse( + "Transactions are not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + Pipeline pipeline = + firestore + .pipeline() + .createFrom(collection) + .where(eq("awards.hugo", true)) + .select("title", "awards.hugo", Field.DOCUMENT_ID); + + firestore + .runTransaction( + transaction -> { + List results = transaction.execute(pipeline).get().getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "The Hitchhiker's Guide to the Galaxy", "awards.hugo", true), + map("title", "Dune", "awards.hugo", true))); + + transaction.update(collection.document("book1"), map("foo", "bar")); + + return "done"; + }) + .get(); + + List result = + firestore + .pipeline() + .createFrom(collection) + .where(eq("foo", "bar")) + .select("title") + .execute() + .get() + .getResults(); + assertThat(data(result)) + .isEqualTo(Lists.newArrayList(map("title", "The Hitchhiker's Guide to the Galaxy"))); + } + + @Test + public void testPipelineInTransactionsWithOptions() throws Exception { + assumeFalse( + "Transactions are not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + Pipeline pipeline = firestore.pipeline().createFrom(collection).limit(1); + + firestore + .runTransaction( + transaction -> { + PipelineExecuteOptions options = new PipelineExecuteOptions().with("foo", "bar"); + List results = + transaction.execute(pipeline, options).get().getResults(); + assertThat(results).hasSize(1); + return "done"; + }) + .get(); + } + + @Test + public void testGenericStage() throws Exception { + // can select fields + List results = + firestore + .pipeline() + .collection(collection.getPath()) + // .select(field("title"), Expr.map(map("author", field("author"))).as("metadata")) + .genericStage( + "select", + Lists.newArrayList( + map( + "title", + field("title"), + "metadata", + Expr.map(map("author", field("author"))))), + new GenericOptions()) + .sort(field("metadata.author").ascending()) + .limit(1) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "title", + "The Hitchhiker's Guide to the Galaxy", + "metadata", + map("author", "Douglas Adams")))); + + // can add fields + results = + firestore + .pipeline() + .collection(collection.getPath()) + .sort(field("author").ascending()) + .limit(1) + .select("title", "author") + .genericStage( + "add_fields", + Lists.newArrayList( + map("display", strConcat(field("title"), " - ", field("author")))), + new GenericOptions()) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map( + "title", + "The Hitchhiker's Guide to the Galaxy", + "author", + "Douglas Adams", + "display", + "The Hitchhiker's Guide to the Galaxy - Douglas Adams"))); + + // can filter with where + results = + firestore + .pipeline() + .collection(collection.getPath()) + .select("title", "author") + .genericStage( + "where", Lists.newArrayList(eq("author", "Douglas Adams")), new GenericOptions()) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("title", "The Hitchhiker's Guide to the Galaxy", "author", "Douglas Adams"))); + + // can limit, offset, and sort + results = + firestore + .pipeline() + .collection(collection.getPath()) + .select("title", "author") + .genericStage( + "sort", + Lists.newArrayList(map("direction", "ascending", "expression", field("author"))), + new GenericOptions()) + .genericStage("offset", Lists.newArrayList(3), new GenericOptions()) + .genericStage("limit", Lists.newArrayList(1), new GenericOptions()) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("author", "Fyodor Dostoevsky", "title", "Crime and Punishment"))); + + // can perform aggregate query + results = + firestore + .pipeline() + .collection(collection.getPath()) + .select("title", "author", "rating") + .genericStage( + "aggregate", + Lists.newArrayList(map("averageRating", avg("rating")), map()), + new GenericOptions()) + .execute() + .get() + .getResults(); + Map aggregateResult = data(results).get(0); + assertThat((Double) aggregateResult.get("averageRating")).isWithin(0.00001).of(4.31); + + // can perform distinct query + results = + firestore + .pipeline() + .collection(collection.getPath()) + .select("title", "author", "rating") + .genericStage( + "distinct", + Lists.newArrayList(map("rating", field("rating"))), + new GenericOptions()) + .sort(field("rating").descending()) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .containsExactly( + map("rating", 4.7), + map("rating", 4.6), + map("rating", 4.5), + map("rating", 4.3), + map("rating", 4.2), + map("rating", 4.1), + map("rating", 4.0), + map("rating", null)); + + // can perform FindNearest query + results = + firestore + .pipeline() + .collection(collection.getPath()) + .genericStage( + "find_nearest", + Lists.newArrayList( + field("embedding"), + vector(new double[] {10.0, 1.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}), + "euclidean"), + new GenericOptions() + .with("distance_field", field("computedDistance")) + .with("limit", 2)) + .select("title", "computedDistance") + .execute() + .get() + .getResults(); + assertThat(results.size()).isEqualTo(2); + assertThat(results.get(0).getData().get("title")) + .isEqualTo("The Hitchhiker's Guide to the Galaxy"); + assertThat((Double) results.get(0).getData().get("computedDistance")).isWithin(0.00001).of(1.0); + assertThat(results.get(1).getData().get("title")).isEqualTo("One Hundred Years of Solitude"); + assertThat((Double) results.get(1).getData().get("computedDistance")) + .isWithin(0.00001) + .of(12.041594578792296); + } + + @Test + public void testReplaceWith() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "The Hitchhiker's Guide to the Galaxy")) + .replaceWith("awards") + .execute() + .get() + .getResults(); + assertThat(data(results)).isEqualTo(Lists.newArrayList(map("hugo", true, "nebula", false))); + + results = + firestore + .pipeline() + .createFrom(collection) + .where(eq("title", "The Hitchhiker's Guide to the Galaxy")) + .replaceWith(Expr.map(map("foo", "bar", "baz", Expr.map(map("title", field("title")))))) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("foo", "bar", "baz", map("title", "The Hitchhiker's Guide to the Galaxy")))); + } + + @Test + public void testSampleLimit() throws Exception { + List results = + firestore.pipeline().createFrom(collection).sample(3).execute().get().getResults(); + + assertThat(results).hasSize(3); + } + + @Test + public void testSamplePercentage() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .sample(Sample.withPercentage(0.6)) + .execute() + .get() + .getResults(); + + assertThat(results).isNotEmpty(); + } + + @Test + public void testUnion() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .union(firestore.pipeline().createFrom(collection)) + .execute() + .get() + .getResults(); + + assertThat(results).hasSize(22); + } + + @Test + public void testUnnest() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq(field("title"), "The Hitchhiker's Guide to the Galaxy")) + .unnest("tags", "tag") + .execute() + .get() + .getResults(); + + assertThat(results).hasSize(3); + } + + @Test + public void testUnnestWithIndexField() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq(field("title"), "The Hitchhiker's Guide to the Galaxy")) + .unnest("tags", "tag", new UnnestOptions().withIndexField("tagsIndex")) + .execute() + .get() + .getResults(); + + assertThat(results).hasSize(3); + for (int i = 0; i < results.size(); i++) { + assertThat(results.get(i).getData().get("tagsIndex")).isEqualTo((long) i); + } + } + + @Test + public void testUnnestWithExpr() throws Exception { + List results = + firestore + .pipeline() + .createFrom(collection) + .where(eq(field("title"), "The Hitchhiker's Guide to the Galaxy")) + .unnest(array(1L, 2L, 3L).as("copy")) + .execute() + .get() + .getResults(); + + assertThat(results).hasSize(3); + for (int i = 0; i < results.size(); i++) { + assertThat(results.get(i).getData().get("copy")).isEqualTo((long) i + 1); + } + } + + @Test + public void testPaginationWithStartAfter() throws Exception { + CollectionReference paginationCollection = + testCollectionWithDocs( + ImmutableMap.>builder() + .put("doc1", map("order", 1)) + .put("doc2", map("order", 2)) + .put("doc3", map("order", 3)) + .put("doc4", map("order", 4)) + .build()); + + Pipeline pipeline = + firestore.pipeline().createFrom(paginationCollection.orderBy("order").limit(2)); + + PipelineSnapshot snapshot = pipeline.execute().get(); + assertThat(data(snapshot.getResults())).containsExactly(map("order", 1L), map("order", 2L)); + + PipelineResult lastResult = snapshot.getResults().get(snapshot.getResults().size() - 1); + snapshot = + firestore + .pipeline() + .createFrom(paginationCollection.orderBy("order").startAfter(lastResult.get("order"))) + .execute() + .get(); + assertThat(data(snapshot.getResults())).containsExactly(map("order", 3L), map("order", 4L)); + } + + @Test + public void testDocumentsAsSource() throws Exception { + List results = + firestore + .pipeline() + .documents( + collection.document("book1"), + collection.document("book2"), + collection.document("book3")) + .execute() + .get() + .getResults(); + assertThat(results).hasSize(3); + } + + @Test + public void testCollectionGroupAsSource() throws Exception { + String subcollectionId = LocalFirestoreHelper.autoId(); + collection.document("book1").collection(subcollectionId).add(map("order", 1)).get(); + collection.document("book2").collection(subcollectionId).add(map("order", 2)).get(); + List results = + firestore + .pipeline() + .collectionGroup(subcollectionId) + .sort(field("order").ascending()) + .execute() + .get() + .getResults(); + assertThat(data(results)).isEqualTo(Lists.newArrayList(map("order", 1L), map("order", 2L))); + } + + @Test + public void testDatabaseAsSource() throws Exception { + String randomId = LocalFirestoreHelper.autoId(); + collection.document("book1").collection("sub").add(map("order", 1, "randomId", randomId)).get(); + collection.document("book2").collection("sub").add(map("order", 2, "randomId", randomId)).get(); + List results = + firestore + .pipeline() + .database() + .where(eq("randomId", randomId)) + .sort(field("order").ascending()) + .execute() + .get() + .getResults(); + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("order", 1L, "randomId", randomId), map("order", 2L, "randomId", randomId))); + } + + @Test + public void testFindNearest() throws Exception { + List results = + firestore + .pipeline() + .collection(collection.getPath()) + .findNearest( + "embedding", + new double[] {10.0, 1.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}, + FindNearest.DistanceMeasure.EUCLIDEAN, + new FindNearestOptions().withLimit(2).withDistanceField("computedDistance")) + .select("title", "computedDistance") + .execute() + .get() + .getResults(); + assertThat(results.size()).isEqualTo(2); + assertThat(results.get(0).getData().get("title")) + .isEqualTo("The Hitchhiker's Guide to the Galaxy"); + assertThat((Double) results.get(0).getData().get("computedDistance")).isWithin(0.00001).of(1.0); + assertThat(results.get(1).getData().get("title")).isEqualTo("One Hundred Years of Solitude"); + assertThat((Double) results.get(1).getData().get("computedDistance")) + .isWithin(0.00001) + .of(12.041594578792296); + } + + @Test + public void testExplain() throws Exception { + assumeFalse( + "Explain is not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + Pipeline pipeline = + firestore.pipeline().createFrom(collection).sort(field("__name__").ascending()); + PipelineSnapshot snapshot = + pipeline + .execute( + new PipelineExecuteOptions() + .withExplainOptions( + new ExplainOptions() + .withExecutionMode(ExplainOptions.ExecutionMode.ANALYZE))) + .get(); + assertThat(snapshot.getResults()).isNotEmpty(); + assertThat(snapshot.getExplainStats().getText()).isNotEmpty(); + + snapshot = + pipeline + .execute(new PipelineExecuteOptions().withExplainOptions(new ExplainOptions())) + .get(); + assertThat(snapshot.getResults()).isNotEmpty(); + assertThat(snapshot.getExplainStats()).isNull(); + } + + @Test + public void testOptions() { + // This is just example of execute and stage options. + PipelineExecuteOptions opts = + new PipelineExecuteOptions() + .withIndexMode("recommended") + .withExplainOptions( + new ExplainOptions().withExecutionMode(ExplainOptions.ExecutionMode.ANALYZE)); + + double[] vector = {1.0, 2.0, 3.0}; + + Pipeline pipeline = + firestore + .pipeline() + .collection( + "/k", + // Remove Hints overload - can be added later. + new CollectionOptions() + .withHints(new CollectionHints().withForceIndex("abcdef").with("foo", "bar")) + .with("foo", "bar")) + .findNearest( + "topicVectors", + vector, + FindNearest.DistanceMeasure.COSINE, + new FindNearestOptions() + .withLimit(10) + .withDistanceField("distance") + .with("foo", "bar")) + .aggregate( + Aggregate.withAccumulators(avg("rating").as("avg_rating")) + .withGroups("genre") + .withOptions( + new AggregateOptions() + .withHints( + new AggregateHints() + .withForceStreamableEnabled() + .with("foo", "bar")) + .with("foo", "bar"))); + + pipeline.execute(opts); + } + + @Test + public void testErrorHandling() { + assumeFalse( + "Error handling is not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + ExecutionException exception = + assertThrows( + ExecutionException.class, + () -> { + firestore + .pipeline() + .collection(collection.getPath()) + .genericStage("invalidStage", Lists.newArrayList(), new GenericOptions()) + .execute() + .get(); + }); + assertThat(exception.getCause()).isInstanceOf(ApiException.class); + ApiException apiException = (ApiException) exception.getCause(); + assertThat(apiException.getStatusCode().getCode()).isEqualTo(StatusCode.Code.INVALID_ARGUMENT); + } + + @Test + public void testExplainWithError() { + assumeFalse( + "Explain with error is not supported against the emulator.", + isRunningAgainstFirestoreEmulator(firestore)); + Pipeline pipeline = + firestore.pipeline().createFrom(collection).sort(field("rating").ascending()); + ExecutionException exception = + assertThrows( + ExecutionException.class, + () -> { + pipeline + .execute( + new PipelineExecuteOptions() + .withExplainOptions( + new ExplainOptions() + .withExecutionMode(ExplainOptions.ExecutionMode.ANALYZE)) + .with("memory_limit", 1)) + .get(); + }); + assertThat(exception.getCause()).isInstanceOf(ApiException.class); + ApiException apiException = (ApiException) exception.getCause(); + assertThat(apiException.getStatusCode().getCode()) + .isEqualTo(StatusCode.Code.RESOURCE_EXHAUSTED); + } + + @Test + public void testCrossDatabaseRejection() throws Exception { + FirestoreOptions firestoreOptions = + FirestoreOptions.newBuilder().setProjectId("test-project-2").build(); + try (Firestore firestore2 = firestoreOptions.getService()) { + CollectionReference collection2 = firestore2.collection("test-collection"); + IllegalArgumentException exception = + assertThrows( + IllegalArgumentException.class, + () -> { + firestore.pipeline().collection(collection2); + }); + assertThat(exception.getMessage()).contains("Invalid CollectionReference"); + } + } +} diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryAggregationsTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryAggregationsTest.java index 7659d4656..e80f26a7d 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryAggregationsTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryAggregationsTest.java @@ -30,6 +30,7 @@ import com.google.api.core.ApiFuture; import com.google.cloud.firestore.*; +import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; import org.junit.Ignore; @@ -56,6 +57,19 @@ private CollectionReference testCollectionWithDocs(Map pipelineResults = + query.getQuery().getFirestore().pipeline().createFrom(query).execute().get().getResults(); + assertThat(pipelineResults).hasSize(1); + assertThat(pipelineResults.get(0).getData()) + .isEqualTo(TestUtil.getAggregateSnapshotData(snapshot)); + + return snapshot; + } + public static void writeAllDocs( CollectionReference collection, Map> docs) throws InterruptedException { @@ -74,12 +88,17 @@ public static void writeAllDocs( @Test public void canRunCountUsingAggregationMethod() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); - AggregateQuerySnapshot snapshot = collection.aggregate(AggregateField.count()).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(AggregateField.count())); assertThat(snapshot.getCount()).isEqualTo(2); } @Test public void allowsAliasesForLongestFieldNames() throws Exception { + assumeFalse( + "Skip this test when running against the Firestore emulator because it does not support long field names.", + isRunningAgainstFirestoreEmulator(firestore)); + // The longest field name allowed is 1499 characters long. // Ensure that sum(longestField) and average(longestField) work. StringBuilder builder = new StringBuilder(1500); @@ -92,10 +111,10 @@ public void allowsAliasesForLongestFieldNames() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection.aggregate(AggregateField.sum(longestField)).get().get(); + verifyPipelineReturnsSameResult(collection.aggregate(AggregateField.sum(longestField))); assertThat(snapshot.get(AggregateField.sum(longestField))).isEqualTo(6); AggregateQuerySnapshot snapshot2 = - collection.aggregate(AggregateField.average(longestField)).get().get(); + verifyPipelineReturnsSameResult(collection.aggregate(AggregateField.average(longestField))); assertThat(snapshot2.get(AggregateField.average(longestField))).isEqualTo(3.0); } @@ -134,14 +153,16 @@ public void aggregateErrorMessageIfIndexIsMissing() throws Exception { @Test public void canRunSumQuery() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("pages")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("pages"))); assertThat(snapshot.get(sum("pages"))).isEqualTo(150); } @Test public void canRunAverageQuery() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); - AggregateQuerySnapshot snapshot = collection.aggregate(average("pages")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("pages"))); assertThat(snapshot.get(average("pages"))).isEqualTo(75.0); } @@ -149,7 +170,8 @@ public void canRunAverageQuery() throws Exception { public void canGetMultipleAggregationsInTheSameQuery() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); AggregateQuerySnapshot snapshot = - collection.aggregate(sum("pages"), average("pages"), AggregateField.count()).get().get(); + verifyPipelineReturnsSameResult( + collection.aggregate(sum("pages"), average("pages"), AggregateField.count())); assertThat(snapshot.get(sum("pages"))).isEqualTo(150); assertThat(snapshot.get(average("pages"))).isEqualTo(75.0); assertThat(snapshot.get(AggregateField.count())).isEqualTo(2); @@ -159,7 +181,8 @@ public void canGetMultipleAggregationsInTheSameQuery() throws Exception { public void getCorrectTypeForSumLong() throws Exception { Map> testDocs = map("a", map("foo", 100), "b", map("foo", 100)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("foo")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("foo"))); Object sum = snapshot.get(sum("foo")); assertThat(sum instanceof Long).isTrue(); } @@ -168,7 +191,8 @@ public void getCorrectTypeForSumLong() throws Exception { public void getCorrectTypeForSumDouble() throws Exception { Map> testDocs = map("a", map("foo", 100.5), "b", map("foo", 100)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("foo")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("foo"))); Object sum = snapshot.get(sum("foo")); assertThat(sum instanceof Double).isTrue(); } @@ -178,7 +202,8 @@ public void getCorrectTypeForSumNaN() throws Exception { Map> testDocs = map("a", map("foo", 100.5), "b", map("foo", Double.NaN)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("foo")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("foo"))); Object sum = snapshot.get(sum("foo")); assertThat(sum instanceof Double).isTrue(); assertThat(sum.equals(Double.NaN)); @@ -187,7 +212,8 @@ public void getCorrectTypeForSumNaN() throws Exception { @Test public void getCorrectTypeForAverageDouble() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); - AggregateQuerySnapshot snapshot = collection.aggregate(average("pages")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("pages"))); Object average = snapshot.get((AggregateField) average("pages")); assertThat(average instanceof Double).isTrue(); } @@ -197,7 +223,8 @@ public void getCorrectTypeForAverageNaN() throws Exception { Map> testDocs = map("a", map("foo", 100.5), "b", map("foo", Double.NaN)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("foo")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("foo"))); Object sum = snapshot.get(average("foo")); assertThat(sum instanceof Double).isTrue(); assertThat(sum.equals(Double.NaN)); @@ -206,7 +233,8 @@ public void getCorrectTypeForAverageNaN() throws Exception { @Test public void getCorrectTypeForAverageNull() throws Exception { CollectionReference collection = testCollection(); - AggregateQuerySnapshot snapshot = collection.aggregate(average("bar")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("bar"))); Object sum = snapshot.get(average("bar")); assertThat(sum == null).isTrue(); } @@ -222,7 +250,8 @@ public void canPerformMaxAggregations() throws Exception { AggregateField f3 = AggregateField.count(); AggregateField f4 = sum("foo"); AggregateField f5 = sum("bar"); - AggregateQuerySnapshot snapshot = collection.aggregate(f1, f2, f3, f4, f5).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(f1, f2, f3, f4, f5)); assertThat(snapshot.get(f1)).isEqualTo(150); assertThat(snapshot.get(f2)).isEqualTo(75.0); assertThat(snapshot.get(f3)).isEqualTo(2); @@ -248,7 +277,9 @@ public void cannotPerformMoreThanMaxAggregations() throws Exception { exception = e; } assertThat(exception).isNotNull(); - assertThat(exception.getMessage()).contains("maximum number of aggregations"); + if (!isRunningAgainstFirestoreEmulator(firestore)) { + assertThat(exception.getMessage()).contains("maximum number of aggregations"); + } } @Test @@ -289,7 +320,8 @@ public void aggregateQueriesSupportCollectionGroups() throws Exception { .set(data)); CollectionGroup collectionGroup = firestore.collectionGroup(collectionGroupId); AggregateQuerySnapshot snapshot = - collectionGroup.aggregate(AggregateField.count(), sum("x"), average("x")).get().get(); + verifyPipelineReturnsSameResult( + collectionGroup.aggregate(AggregateField.count(), sum("x"), average("x"))); assertThat(snapshot.get(AggregateField.count())).isEqualTo(2); assertThat(snapshot.get(sum("x"))).isEqualTo(4); assertThat(snapshot.get(average("x"))).isEqualTo(2); @@ -312,10 +344,9 @@ public void performsAggregationsOnDocumentsWithAllAggregatedFields() throws Exce map("author", "authorD", "title", "titleD", "pages", 50)); CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection - .aggregate(sum("pages"), average("pages"), average("year"), AggregateField.count()) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection.aggregate( + sum("pages"), average("pages"), average("year"), AggregateField.count())); assertThat(snapshot.get(sum("pages"))).isEqualTo(300); assertThat(snapshot.get(average("pages"))).isEqualTo(100); assertThat(snapshot.get(average("year"))).isEqualTo(2007); @@ -353,7 +384,8 @@ public void performsAggregationsWhenNaNExistsForSomeFieldValues() throws Excepti 0)); CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection.aggregate(sum("rating"), sum("pages"), average("year")).get().get(); + verifyPipelineReturnsSameResult( + collection.aggregate(sum("rating"), sum("pages"), average("year"))); assertThat(snapshot.get(sum("rating"))).isEqualTo(Double.NaN); assertThat(snapshot.get(sum("pages"))).isEqualTo(300); assertThat(snapshot.get(average("year"))).isEqualTo(2000); @@ -362,7 +394,8 @@ public void performsAggregationsWhenNaNExistsForSomeFieldValues() throws Excepti @Test public void throwsAnErrorWhenGettingTheResultOfAnUnrequestedAggregation() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("pages")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("pages"))); Exception exception = null; try { snapshot.get(average("pages")); @@ -406,16 +439,15 @@ public void performsAggregationWhenUsingInOperator() throws Exception { 0)); CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection - .whereIn("rating", asList(5, 3)) - .aggregate( - sum("rating"), - average("rating"), - sum("pages"), - average("pages"), - AggregateField.count()) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection + .whereIn("rating", asList(5, 3)) + .aggregate( + sum("rating"), + average("rating"), + sum("pages"), + average("pages"), + AggregateField.count())); assertThat(snapshot.get(sum("rating"))).isEqualTo(8); assertThat(snapshot.get(average("rating"))).isEqualTo(4); assertThat(snapshot.get(sum("pages"))).isEqualTo(200); @@ -464,16 +496,15 @@ public void performsAggregationWhenUsingArrayContainsAnyOperator() throws Except asList(0))); CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection - .whereArrayContainsAny("rating", asList(5, 3)) - .aggregate( - sum("rating"), - average("rating"), - sum("pages"), - average("pages"), - AggregateField.count()) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection + .whereArrayContainsAny("rating", asList(5, 3)) + .aggregate( + sum("rating"), + average("rating"), + sum("pages"), + average("pages"), + AggregateField.count())); assertThat(snapshot.get(sum("rating"))).isEqualTo(0); assertThat(snapshot.get(average("rating"))).isEqualTo(null); assertThat(snapshot.get(sum("pages"))).isEqualTo(200); @@ -503,10 +534,9 @@ public void performsAggregationsOnNestedMapValues() throws Exception { map("pages", 50, "rating", map("critic", 4, "user", 4)))); CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection - .aggregate(sum("metadata.pages"), average("metadata.pages"), AggregateField.count()) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection.aggregate( + sum("metadata.pages"), average("metadata.pages"), AggregateField.count())); assertThat(snapshot.get(sum("metadata.pages"))).isEqualTo(150); assertThat(snapshot.get(average("metadata.pages"))).isEqualTo(75); assertThat(snapshot.get(AggregateField.count())).isEqualTo(2); @@ -520,7 +550,8 @@ public void performsSumThatResultsInFloat() throws Exception { "b", map("author", "authorB", "title", "titleB", "rating", 4.5), "c", map("author", "authorC", "title", "titleC", "rating", 3)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("rating"))); Object sum = snapshot.get(sum("rating")); assertThat(sum instanceof Double).isTrue(); assertThat(sum).isEqualTo(12.5); @@ -534,7 +565,8 @@ public void performsSumOfIntsAndFloatsThatResultsInInt() throws Exception { "b", map("author", "authorB", "title", "titleB", "rating", 4.5), "c", map("author", "authorC", "title", "titleC", "rating", 3.5)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("rating"))); Object sum = snapshot.get(sum("rating")); assertThat(sum instanceof Double).isTrue(); assertThat(sum).isEqualTo(13.0); @@ -576,7 +608,8 @@ public void performsSumThatIsNegative() throws Exception { "c", map("author", "authorC", "title", "titleC", "rating", -101), "d", map("author", "authorD", "title", "titleD", "rating", -10000)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("rating"))); assertThat(snapshot.get(sum("rating"))).isEqualTo(-10101); } @@ -587,7 +620,8 @@ public void performsSumThatIsPositiveInfinity() throws Exception { "a", map("author", "authorA", "title", "titleA", "rating", Double.MAX_VALUE), "b", map("author", "authorB", "title", "titleB", "rating", Double.MAX_VALUE)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("rating"))); Object sum = snapshot.get(sum("rating")); assertThat(sum instanceof Double).isTrue(); assertThat(sum).isEqualTo(Double.POSITIVE_INFINITY); @@ -602,7 +636,8 @@ public void performsSumThatIsNegativeInfinity() throws Exception { "a", map("author", "authorA", "title", "titleA", "rating", -Double.MAX_VALUE), "b", map("author", "authorB", "title", "titleB", "rating", -Double.MAX_VALUE)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("rating"))); Object sum = snapshot.get(sum("rating")); assertThat(sum instanceof Double).isTrue(); assertThat(sum).isEqualTo(Double.NEGATIVE_INFINITY); @@ -626,7 +661,7 @@ public void performsSumThatIsValidButCouldOverflowDuringAggregation() throws Exc AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); Object sum = snapshot.get(sum("rating")); assertThat(sum instanceof Double).isTrue(); - assertThat(sum).isAnyOf(0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY); + assertThat(sum).isAnyOf(0, 0.0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY); } @Test @@ -638,7 +673,8 @@ public void performsSumThatIncludesNaN() throws Exception { "c", map("author", "authorC", "title", "titleC", "rating", Double.NaN), "d", map("author", "authorD", "title", "titleD", "rating", 0)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("rating"))); assertThat(snapshot.get(sum("rating"))).isEqualTo(Double.NaN); } @@ -646,7 +682,8 @@ public void performsSumThatIncludesNaN() throws Exception { public void performsSumOverResultSetOfZeroDocuments() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); AggregateQuerySnapshot snapshot = - collection.whereGreaterThan("pages", 200).aggregate(sum("pages")).get().get(); + verifyPipelineReturnsSameResult( + collection.whereGreaterThan("pages", 200).aggregate(sum("pages"))); assertThat(snapshot.get(sum("pages"))).isEqualTo(0); } @@ -660,7 +697,8 @@ public void performsSumOnlyOnNumericFields() throws Exception { "d", map("author", "authorD", "title", "titleD", "rating", 1)); CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection.aggregate(sum("rating"), AggregateField.count()).get().get(); + verifyPipelineReturnsSameResult( + collection.aggregate(sum("rating"), AggregateField.count())); assertThat(snapshot.get(sum("rating"))).isEqualTo(10); assertThat(snapshot.get(AggregateField.count())).isEqualTo(4); } @@ -670,7 +708,8 @@ public void performsSumOfMinIEEE754() throws Exception { Map> testDocs = map("a", map("author", "authorA", "title", "titleA", "rating", Double.MIN_VALUE)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(sum("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(sum("rating"))); assertThat(snapshot.get(sum("rating"))).isEqualTo(Double.MIN_VALUE); } @@ -682,7 +721,8 @@ public void performsAverageOfIntsThatResultsInAnInt() throws Exception { "b", map("author", "authorB", "title", "titleB", "rating", 5), "c", map("author", "authorC", "title", "titleC", "rating", 0)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(5); assertThat(snapshot.getLong(average("rating"))).isEqualTo(5L); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(5.0); @@ -695,7 +735,8 @@ public void performsAverageOfFloatsThatResultsInAnInt() throws Exception { "a", map("author", "authorA", "title", "titleA", "rating", 10.5), "b", map("author", "authorB", "title", "titleB", "rating", 9.5)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating")) instanceof Double).isTrue(); assertThat(snapshot.get(average("rating"))).isEqualTo(10); assertThat(snapshot.getLong(average("rating"))).isEqualTo(10L); @@ -710,7 +751,8 @@ public void performsAverageOfFloatsAndIntsThatResultsInAnInt() throws Exception "b", map("author", "authorB", "title", "titleB", "rating", 9.5), "c", map("author", "authorC", "title", "titleC", "rating", 10.5)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(10); assertThat(snapshot.getLong(average("rating"))).isEqualTo(10L); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(10.0); @@ -724,7 +766,8 @@ public void performsAverageOfFloatsThatResultsInAFloat() throws Exception { "b", map("author", "authorB", "title", "titleB", "rating", 4.5), "c", map("author", "authorC", "title", "titleC", "rating", 3.5)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(4.5); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(4.5); assertThat(snapshot.getLong(average("rating"))).isEqualTo(4L); @@ -738,7 +781,8 @@ public void performsAverageOfFloatsAndIntsThatResultsInAFloat() throws Exception "b", map("author", "authorB", "title", "titleB", "rating", 9), "c", map("author", "authorC", "title", "titleC", "rating", 10)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(27.6 / 3); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(27.6 / 3); assertThat(snapshot.getLong(average("rating"))).isEqualTo(9L); @@ -751,7 +795,8 @@ public void performsAverageOfIntsThatResultsInAFloat() throws Exception { "a", map("author", "authorA", "title", "titleA", "rating", 10), "b", map("author", "authorB", "title", "titleB", "rating", 9)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(9.5); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(9.5d); assertThat(snapshot.getLong(average("rating"))).isEqualTo(9L); @@ -764,7 +809,8 @@ public void performsAverageCausingUnderflow() throws Exception { "a", map("author", "authorA", "title", "titleA", "rating", Double.MIN_VALUE), "b", map("author", "authorB", "title", "titleB", "rating", 0)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(0); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(0.0d); assertThat(snapshot.getLong(average("rating"))).isEqualTo(0L); @@ -775,7 +821,8 @@ public void performsAverageOfMinIEEE754() throws Exception { Map> testDocs = map("a", map("author", "authorA", "title", "titleA", "rating", Double.MIN_VALUE)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(Double.MIN_VALUE); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(Double.MIN_VALUE); assertThat(snapshot.getLong(average("rating"))).isEqualTo(0); @@ -790,7 +837,8 @@ public void performsAverageThatCouldOverflowIEEE754DuringAccumulation() throws E "b", map("author", "authorB", "title", "titleB", "rating", Double.MAX_VALUE)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(Double.POSITIVE_INFINITY); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(Double.POSITIVE_INFINITY); assertThat(snapshot.getLong(average("rating"))).isEqualTo(Long.MAX_VALUE); @@ -809,7 +857,8 @@ public void performsAverageThatIncludesNaN() throws Exception { "d", map("author", "authorD", "title", "titleD", "rating", 0)); CollectionReference collection = testCollectionWithDocs(testDocs); - AggregateQuerySnapshot snapshot = collection.aggregate(average("rating")).get().get(); + AggregateQuerySnapshot snapshot = + verifyPipelineReturnsSameResult(collection.aggregate(average("rating"))); assertThat(snapshot.get(average("rating"))).isEqualTo(Double.NaN); assertThat(snapshot.getDouble(average("rating"))).isEqualTo(Double.NaN); assertThat(snapshot.getLong(average("rating"))).isEqualTo(0L); @@ -819,7 +868,8 @@ public void performsAverageThatIncludesNaN() throws Exception { public void performsAverageOverResultSetOfZeroDocuments() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs1); AggregateQuerySnapshot snapshot = - collection.whereGreaterThan("pages", 200).aggregate(average("pages")).get().get(); + verifyPipelineReturnsSameResult( + collection.whereGreaterThan("pages", 200).aggregate(average("pages"))); assertThat(snapshot.get(average("pages"))).isEqualTo(null); assertThat(snapshot.getDouble(average("pages"))).isEqualTo(null); assertThat(snapshot.getLong(average("pages"))).isEqualTo(null); @@ -835,7 +885,8 @@ public void performsAverageOnlyOnNumericFields() throws Exception { "d", map("author", "authorD", "title", "titleD", "rating", 6)); CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection.aggregate(average("rating"), AggregateField.count()).get().get(); + verifyPipelineReturnsSameResult( + collection.aggregate(average("rating"), AggregateField.count())); assertThat(snapshot.get(average("rating"))).isEqualTo(5); assertThat(snapshot.get(AggregateField.count())).isEqualTo(4); } @@ -854,39 +905,35 @@ public void aggregatesWithDocumentReferenceCursors() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs); AggregateQuerySnapshot snapshot = - collection - .orderBy(FieldPath.documentId()) - .startAfter(collection.document("c")) - .aggregate(sum("num")) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection + .orderBy(FieldPath.documentId()) + .startAfter(collection.document("c")) + .aggregate(sum("num"))); assertThat(snapshot.get(sum("num"))).isEqualTo(9); snapshot = - collection - .orderBy(FieldPath.documentId()) - .startAt(collection.document("c")) - .aggregate(sum("num")) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection + .orderBy(FieldPath.documentId()) + .startAt(collection.document("c")) + .aggregate(sum("num"))); assertThat(snapshot.get(sum("num"))).isEqualTo(12); snapshot = - collection - .orderBy(FieldPath.documentId()) - .endBefore(collection.document("c")) - .aggregate(sum("num")) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection + .orderBy(FieldPath.documentId()) + .endBefore(collection.document("c")) + .aggregate(sum("num"))); assertThat(snapshot.get(sum("num"))).isEqualTo(3); snapshot = - collection - .orderBy(FieldPath.documentId()) - .endAt(collection.document("c")) - .aggregate(sum("num")) - .get() - .get(); + verifyPipelineReturnsSameResult( + collection + .orderBy(FieldPath.documentId()) + .endAt(collection.document("c")) + .aggregate(sum("num"))); assertThat(snapshot.get(sum("num"))).isEqualTo(6); } @@ -902,7 +949,7 @@ CollectionReference addTwoDocsForCursorTesting() throws InterruptedException { public void aggregateWithNoFilterNoOrderByNoCursor() throws Exception { CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(12); } @@ -910,7 +957,7 @@ public void aggregateWithNoFilterNoOrderByNoCursor() throws Exception { public void aggregateWithEqualityFilterNoOrderByNoCursor() throws Exception { CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.whereEqualTo("num", 5).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(5); } @@ -918,7 +965,7 @@ public void aggregateWithEqualityFilterNoOrderByNoCursor() throws Exception { public void aggregateWithInequalityFilterNoOrderByNoCursor() throws Exception { CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.whereGreaterThan("num", 5).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -926,7 +973,7 @@ public void aggregateWithInequalityFilterNoOrderByNoCursor() throws Exception { public void aggregateWithNoFilterExplicitOrderByNoCursor() throws Exception { CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.orderBy("num").aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(12); } @@ -934,7 +981,7 @@ public void aggregateWithNoFilterExplicitOrderByNoCursor() throws Exception { public void aggregateWithEqualityFilterExplicitOrderByNoCursor() throws Exception { CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.whereEqualTo("num", 5).orderBy("num").aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(5); } @@ -943,7 +990,7 @@ public void aggregateWithInequalityFilterExplicitOrderByNoCursor() throws Except CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.whereGreaterThan("num", 5).orderBy("num").aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -951,7 +998,7 @@ public void aggregateWithInequalityFilterExplicitOrderByNoCursor() throws Except public void aggregateNoFilterExplicitOrderByFieldValueCursor() throws Exception { CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.orderBy("num").startAfter(5).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -965,7 +1012,7 @@ public void aggregateNoFilterExplicitOrderByDocumentReferenceCursor() throws Exc .orderBy(FieldPath.documentId()) .startAfter(collection.document("a")) .aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -975,7 +1022,7 @@ public void aggregateNoFilterExplicitOrderByDocumentReferenceCursor() throws Exc public void aggregateNoFilterNoOrderByDocumentReferenceCursor() throws Exception { CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.startAfter(collection.document("a")).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -986,7 +1033,7 @@ public void aggregateNoFilterExplicitOrderByDocumentSnapshotCursor() throws Exce CollectionReference collection = addTwoDocsForCursorTesting(); DocumentSnapshot docSnapshot = collection.document("a").get().get(); AggregateQuery query = collection.orderBy("foo").startAfter(docSnapshot).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -996,7 +1043,7 @@ public void aggregateNoFilterExplicitOrderByDocumentSnapshotCursor2() throws Exc CollectionReference collection = addTwoDocsForCursorTesting(); DocumentSnapshot docSnapshot = collection.document("a").get().get(); AggregateQuery query = collection.orderBy("num").startAfter(docSnapshot).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -1005,7 +1052,7 @@ public void aggregateEqualityFilterExplicitOrderByFieldValueCursor() throws Exce CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.whereEqualTo("num", 5).orderBy("num").startAt(5).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(5); } @@ -1014,7 +1061,7 @@ public void aggregateInequalityFilterExplicitOrderByFieldValueCursor() throws Ex CollectionReference collection = addTwoDocsForCursorTesting(); AggregateQuery query = collection.whereGreaterThan("num", 5).orderBy("num").startAt(6).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -1029,7 +1076,7 @@ public void aggregateEqualityFilterExplicitOrderByDocumentReferenceCursor() thro .orderBy(FieldPath.documentId()) .startAfter(collection.document("a")) .aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -1044,7 +1091,7 @@ public void aggregateInequalityFilterExplicitOrderByDocumentReferenceCursor() th .orderBy(FieldPath.documentId()) .startAfter(5, collection.document("a")) .aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -1056,7 +1103,7 @@ public void aggregateEqualityFilterNoOrderByDocumentSnapshotReference() throws E DocumentSnapshot docSnapshot = collection.document("a").get().get(); AggregateQuery query = collection.whereEqualTo("num", 7).startAfter(docSnapshot).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -1067,7 +1114,7 @@ public void aggregateInequalityFilterNoOrderByDocumentSnapshotReference() throws DocumentSnapshot docSnapshot = collection.document("a").get().get(); AggregateQuery query = collection.whereGreaterThan("num", 0).startAfter(docSnapshot).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } @@ -1079,7 +1126,7 @@ public void aggregateInequalityFilterNoOrderByDocumentSnapshotReference2() throw DocumentSnapshot docSnapshot = collection.document("a").get().get(); AggregateQuery query = collection.whereGreaterThan("foo", 0).startAfter(docSnapshot).aggregate(sum("num")); - AggregateQuerySnapshot snapshot = query.get().get(); + AggregateQuerySnapshot snapshot = verifyPipelineReturnsSameResult(query); assertThat(snapshot.get(sum("num"))).isEqualTo(7); } diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryTest.java index 6125d24f4..fe6e7fcf9 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryTest.java @@ -19,26 +19,22 @@ import static com.google.cloud.firestore.it.TestHelper.isRunningAgainstFirestoreEmulator; import static com.google.common.primitives.Ints.asList; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; -import static org.junit.Assume.assumeTrue; +import static org.junit.Assume.assumeFalse; -import com.google.api.core.ApiFuture; -import com.google.api.gax.rpc.ApiStreamObserver; import com.google.cloud.firestore.*; import com.google.cloud.firestore.Query.Direction; -import java.time.Duration; +import com.google.common.collect.Sets; import java.util.Arrays; import java.util.Collections; -import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; -import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; @@ -73,16 +69,52 @@ public CollectionReference testCollectionWithDocs(Map result = + snapshot.getDocuments().stream() + .map(queryDocumentSnapshot -> queryDocumentSnapshot.getReference().getId()) + .collect(Collectors.toList()); + // assertThat(result).isEqualTo(Arrays.asList(docs)); + } + + List pipelineResults = + query.getFirestore().pipeline().createFrom(query).execute().get().getResults(); List result = - snapshot.getDocuments().stream() - .map(queryDocumentSnapshot -> queryDocumentSnapshot.getReference().getId()) + pipelineResults.stream() + .map(pipelineResult -> Objects.requireNonNull(pipelineResult.getReference()).getId()) .collect(Collectors.toList()); assertThat(result).isEqualTo(Arrays.asList(docs)); } + public static void checkResultContainsDocuments(Query query, boolean pipelineOnly, String... docs) + throws ExecutionException, InterruptedException { + if (!pipelineOnly) { + QuerySnapshot snapshot = query.get().get(); + Set result = + snapshot.getDocuments().stream() + .map(queryDocumentSnapshot -> queryDocumentSnapshot.getReference().getId()) + .collect(Collectors.toSet()); + assertThat(result).isEqualTo(Sets.newHashSet(docs)); + } + + List pipelineResults = + query.getFirestore().pipeline().createFrom(query).execute().get().getResults(); + Set result = + pipelineResults.stream() + .map(pipelineResult -> Objects.requireNonNull(pipelineResult.getReference()).getId()) + .collect(Collectors.toSet()); + assertThat(result).isEqualTo(Sets.newHashSet(docs)); + } + @Test public void orQueries() throws Exception { Map> testDocs = @@ -96,7 +128,7 @@ public void orQueries() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs); // Two equalities: a==1 || b==1. - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where(Filter.or(Filter.equalTo("a", 1), Filter.equalTo("b", 1))), "doc1", "doc2", @@ -104,7 +136,7 @@ public void orQueries() throws Exception { "doc5"); // (a==1 && b==0) || (a==3 && b==2) - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where( Filter.or( Filter.and(Filter.equalTo("a", 1), Filter.equalTo("b", 0)), @@ -113,7 +145,7 @@ public void orQueries() throws Exception { "doc3"); // a==1 && (b==0 || b==3). - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where( Filter.and( Filter.equalTo("a", 1), Filter.or(Filter.equalTo("b", 0), Filter.equalTo("b", 3)))), @@ -121,7 +153,7 @@ public void orQueries() throws Exception { "doc4"); // (a==2 || b==2) && (a==3 || b==3) - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where( Filter.and( Filter.or(Filter.equalTo("a", 2), Filter.equalTo("b", 2)), @@ -129,16 +161,13 @@ public void orQueries() throws Exception { "doc3"); // Test with limits without orderBy (the __name__ ordering is the tiebreaker). - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where(Filter.or(Filter.equalTo("a", 2), Filter.equalTo("b", 1))).limit(1), "doc2"); } @Test public void orQueriesWithCompositeIndexes() throws Exception { - assumeTrue( - "Skip this test when running against production because these queries require a composite index.", - isRunningAgainstFirestoreEmulator(firestore)); Map> testDocs = map( "doc1", map("a", 1, "b", 0), @@ -150,50 +179,56 @@ public void orQueriesWithCompositeIndexes() throws Exception { CollectionReference collection = testCollectionWithDocs(testDocs); // with one inequality: a>2 || b==1. - checkQuerySnapshotContainsDocuments( + checkResultContainsDocuments( collection.where(Filter.or(Filter.greaterThan("a", 2), Filter.equalTo("b", 1))), + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc5", "doc2", "doc3"); // Test with limits (implicit order by ASC): (a==1) || (b > 0) LIMIT 2 - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where(Filter.or(Filter.equalTo("a", 1), Filter.greaterThan("b", 0))).limit(2), + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc1", "doc2"); // Test with limits (explicit order by): (a==1) || (b > 0) LIMIT_TO_LAST 2 // Note: The public query API does not allow implicit ordering when limitToLast is used. - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection .where(Filter.or(Filter.equalTo("a", 1), Filter.greaterThan("b", 0))) .limitToLast(2) .orderBy("b"), + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc3", "doc4"); // Test with limits (explicit order by ASC): (a==2) || (b == 1) ORDER BY a LIMIT 1 - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection .where(Filter.or(Filter.equalTo("a", 2), Filter.equalTo("b", 1))) .limit(1) .orderBy("a"), + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc5"); // Test with limits (explicit order by DESC): (a==2) || (b == 1) ORDER BY a LIMIT_TO_LAST 1 - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection .where(Filter.or(Filter.equalTo("a", 2), Filter.equalTo("b", 1))) .limitToLast(1) .orderBy("a"), + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc2"); // Test with limits (explicit order by DESC): (a==2) || (b == 1) ORDER BY a DESC LIMIT 1 - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection .where(Filter.or(Filter.equalTo("a", 2), Filter.equalTo("b", 1))) .limit(1) .orderBy("a", Direction.DESCENDING), + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc2"); } @@ -214,14 +249,11 @@ public void orQueryDoesNotIncludeDocumentsWithMissingFields() throws Exception { // There's no explicit nor implicit orderBy. Documents with missing 'a' or missing 'b' should be // allowed if the document matches at least one disjunction term. Query query = collection.where(Filter.or(Filter.equalTo("a", 1), Filter.equalTo("b", 1))); - checkQuerySnapshotContainsDocuments(query, "doc1", "doc2", "doc4", "doc5"); + checkResultContainsDocumentsInOrder(query, "doc1", "doc2", "doc4", "doc5"); } @Test public void orQueryDoesNotIncludeDocumentsWithMissingFields2() throws Exception { - assumeTrue( - "Skip this test when running against production because these queries require a composite index.", - isRunningAgainstFirestoreEmulator(firestore)); Map> testDocs = map( "doc1", map("a", 1, "b", 0), @@ -237,19 +269,30 @@ public void orQueryDoesNotIncludeDocumentsWithMissingFields2() throws Exception // doc2 should not be included because it's missing the field 'a', and we have "orderBy a". Query query1 = collection.where(Filter.or(Filter.equalTo("a", 1), Filter.equalTo("b", 1))).orderBy("a"); - checkQuerySnapshotContainsDocuments(query1, "doc1", "doc4", "doc5"); + checkResultContainsDocumentsInOrder( + query1, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc1", + "doc4", + "doc5"); // Query: a==1 || b==1 order by b. // doc5 should not be included because it's missing the field 'b', and we have "orderBy b". Query query2 = collection.where(Filter.or(Filter.equalTo("a", 1), Filter.equalTo("b", 1))).orderBy("b"); - checkQuerySnapshotContainsDocuments(query2, "doc1", "doc2", "doc4"); + checkResultContainsDocumentsInOrder( + query2, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc1", + "doc2", + "doc4"); // Query: a>2 || b==1. // This query has an implicit 'order by a'. // doc2 should not be included because it's missing the field 'a'. Query query3 = collection.where(Filter.or(Filter.greaterThan("a", 2), Filter.equalTo("b", 1))); - checkQuerySnapshotContainsDocuments(query3, "doc3"); + checkResultContainsDocumentsInOrder( + query3, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc3"); // Query: a>1 || b==1 order by a order by b. // doc6 should not be included because it's missing the field 'b'. @@ -259,7 +302,8 @@ public void orQueryDoesNotIncludeDocumentsWithMissingFields2() throws Exception .where(Filter.or(Filter.greaterThan("a", 1), Filter.equalTo("b", 1))) .orderBy("a") .orderBy("b"); - checkQuerySnapshotContainsDocuments(query4, "doc3"); + checkResultContainsDocumentsInOrder( + query4, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc3"); } @Test @@ -275,7 +319,7 @@ public void orQueriesWithIn() throws ExecutionException, InterruptedException, T CollectionReference collection = testCollectionWithDocs(testDocs); // a==2 || b in [2,3] - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where(Filter.or(Filter.equalTo("a", 2), Filter.inArray("b", asList(2, 3)))), "doc3", "doc4", @@ -285,8 +329,8 @@ public void orQueriesWithIn() throws ExecutionException, InterruptedException, T @Test public void orQueriesWithNotIn() throws ExecutionException, InterruptedException, TimeoutException { - assumeTrue( - "Skip this test when running against production because it is currently not supported.", + assumeFalse( + "Skip this test when running against the Firestore emulator because it does not support mixing OR and NOT_IN.", isRunningAgainstFirestoreEmulator(firestore)); Map> testDocs = map( @@ -300,8 +344,9 @@ public void orQueriesWithNotIn() // a==2 || b not-in [2,3] // Has implicit orderBy b. - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where(Filter.or(Filter.equalTo("a", 2), Filter.notInArray("b", asList(2, 3)))), + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc1", "doc2"); } @@ -320,14 +365,14 @@ public void orQueriesWithArrayMembership() CollectionReference collection = testCollectionWithDocs(testDocs); // a==2 || b array-contains 7 - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where(Filter.or(Filter.equalTo("a", 2), Filter.arrayContains("b", 7))), "doc3", "doc4", "doc6"); // a==2 || b array-contains-any [0, 3] - checkQuerySnapshotContainsDocuments( + checkResultContainsDocumentsInOrder( collection.where( Filter.or(Filter.equalTo("a", 2), Filter.arrayContainsAny("b", asList(0, 3)))), "doc1", @@ -351,35 +396,31 @@ public void testUsingInWithArrayContains() Query query1 = collection.where( Filter.or(Filter.inArray("a", asList(2, 3)), Filter.arrayContains("b", 3))); - checkQuerySnapshotContainsDocuments(query1, "doc3", "doc4", "doc6"); + checkResultContainsDocumentsInOrder(query1, "doc3", "doc4", "doc6"); Query query2 = collection.where( Filter.and(Filter.inArray("a", asList(2, 3)), Filter.arrayContains("b", 7))); - checkQuerySnapshotContainsDocuments(query2, "doc3"); + checkResultContainsDocumentsInOrder(query2, "doc3"); Query query3 = collection.where( Filter.or( Filter.inArray("a", asList(2, 3)), Filter.and(Filter.arrayContains("b", 3), Filter.equalTo("a", 1)))); - checkQuerySnapshotContainsDocuments(query3, "doc3", "doc4", "doc6"); + checkResultContainsDocumentsInOrder(query3, "doc3", "doc4", "doc6"); Query query4 = collection.where( Filter.and( Filter.inArray("a", asList(2, 3)), Filter.or(Filter.arrayContains("b", 7), Filter.equalTo("a", 1)))); - checkQuerySnapshotContainsDocuments(query4, "doc3"); + checkResultContainsDocumentsInOrder(query4, "doc3"); } @Test public void testOrderByEquality() throws ExecutionException, InterruptedException, TimeoutException { - assumeTrue( - "Skip this test if running against production because order-by-equality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); Map> testDocs = map( "doc1", map("a", 1, "b", asList(0)), @@ -391,21 +432,21 @@ public void testOrderByEquality() CollectionReference collection = testCollectionWithDocs(testDocs); Query query1 = collection.where(Filter.equalTo("a", 1)).orderBy("a"); - checkQuerySnapshotContainsDocuments(query1, "doc1", "doc4", "doc5"); + checkResultContainsDocumentsInOrder( + query1, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc1", + "doc4", + "doc5"); Query query2 = collection.where(Filter.inArray("a", asList(2, 3))).orderBy("a"); - checkQuerySnapshotContainsDocuments(query2, "doc6", "doc3"); + checkResultContainsDocumentsInOrder( + query2, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc6", "doc3"); } /** Multiple Inequality */ @Test public void multipleInequalityOnDifferentFields() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -419,7 +460,8 @@ public void multipleInequalityOnDifferentFields() throws Exception { .whereNotEqualTo("key", "a") .whereLessThanOrEqualTo("sort", 2) .whereGreaterThan("v", 2); - checkQuerySnapshotContainsDocuments(query1, "doc3"); + checkResultContainsDocumentsInOrder( + query1, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc3"); // Duplicate inequality fields Query query2 = @@ -427,7 +469,8 @@ public void multipleInequalityOnDifferentFields() throws Exception { .whereNotEqualTo("key", "a") .whereLessThanOrEqualTo("sort", 2) .whereGreaterThan("sort", 1); - checkQuerySnapshotContainsDocuments(query2, "doc4"); + checkResultContainsDocumentsInOrder( + query2, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc4"); // With multiple IN Query query3 = @@ -436,7 +479,8 @@ public void multipleInequalityOnDifferentFields() throws Exception { .whereLessThanOrEqualTo("sort", 2) .whereIn("v", asList(2, 3, 4)) .whereIn("sort", asList(2, 3)); - checkQuerySnapshotContainsDocuments(query3, "doc4"); + checkResultContainsDocumentsInOrder( + query3, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc4"); // With NOT-IN Query query4 = @@ -444,7 +488,8 @@ public void multipleInequalityOnDifferentFields() throws Exception { .whereGreaterThanOrEqualTo("key", "a") .whereLessThanOrEqualTo("sort", 2) .whereNotIn("v", asList(2, 4, 5)); - checkQuerySnapshotContainsDocuments(query4, "doc1", "doc3"); + checkResultContainsDocumentsInOrder( + query4, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc1", "doc3"); // With orderby Query query5 = @@ -452,7 +497,12 @@ public void multipleInequalityOnDifferentFields() throws Exception { .whereGreaterThanOrEqualTo("key", "a") .whereLessThanOrEqualTo("sort", 2) .orderBy("v", Direction.DESCENDING); - checkQuerySnapshotContainsDocuments(query5, "doc3", "doc4", "doc1"); + checkResultContainsDocumentsInOrder( + query5, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc3", + "doc4", + "doc1"); // With limit Query query6 = @@ -461,7 +511,8 @@ public void multipleInequalityOnDifferentFields() throws Exception { .whereLessThanOrEqualTo("sort", 2) .orderBy("v", Direction.DESCENDING) .limit(2); - checkQuerySnapshotContainsDocuments(query6, "doc3", "doc4"); + checkResultContainsDocumentsInOrder( + query6, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc3", "doc4"); // With limitToLast Query query7 = @@ -470,17 +521,12 @@ public void multipleInequalityOnDifferentFields() throws Exception { .whereLessThanOrEqualTo("sort", 2) .orderBy("v", Direction.DESCENDING) .limitToLast(2); - checkQuerySnapshotContainsDocuments(query7, "doc4", "doc1"); + checkResultContainsDocumentsInOrder( + query7, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc4", "doc1"); } @Test public void multipleInequalityOnSpecialValues() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -492,24 +538,20 @@ public void multipleInequalityOnSpecialValues() throws Exception { "doc6", map("key", "f", "sort", 1, "v", 1))); Query query1 = collection.whereNotEqualTo("key", "a").whereLessThanOrEqualTo("sort", 2); - checkQuerySnapshotContainsDocuments(query1, "doc5", "doc6"); + checkResultContainsDocumentsInOrder( + query1, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc5", "doc6"); Query query2 = collection .whereNotEqualTo("key", "a") .whereLessThanOrEqualTo("sort", 2) .whereLessThanOrEqualTo("v", 1); - checkQuerySnapshotContainsDocuments(query2, "doc6"); + checkResultContainsDocumentsInOrder( + query2, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc6"); } @Test public void multipleInequalityWithArrayMembership() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -533,14 +575,16 @@ public void multipleInequalityWithArrayMembership() throws Exception { .whereNotEqualTo("key", "a") .whereGreaterThanOrEqualTo("sort", 1) .whereArrayContains("v", 0); - checkQuerySnapshotContainsDocuments(query1, "doc2"); + checkResultContainsDocumentsInOrder( + query1, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc2"); Query query2 = collection .whereNotEqualTo("key", "a") .whereGreaterThanOrEqualTo("sort", 1) .whereArrayContainsAny("v", asList(0, 1)); - checkQuerySnapshotContainsDocuments(query2, "doc2", "doc4"); + checkResultContainsDocumentsInOrder( + query2, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc2", "doc4"); } private static Map nestedObject(int number) { @@ -561,12 +605,6 @@ private static Map nestedObject(int number) { // result with the query fields normalized in the server. @Test public void multipleInequalityWithNestedField() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -584,8 +622,13 @@ public void multipleInequalityWithNestedField() throws Exception { .orderBy("name"); DocumentSnapshot docSnap = collection.document("doc4").get().get(); Query query1WithCursor = query1.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query1, "doc4", "doc1"); - checkQuerySnapshotContainsDocuments(query1WithCursor, "doc4", "doc1"); + checkResultContainsDocumentsInOrder( + query1, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc4", "doc1"); + checkResultContainsDocumentsInOrder( + query1WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc4", + "doc1"); // ordered by: name desc, field desc, field.dot desc, field\\slash desc, __name__ desc Query query2 = @@ -596,18 +639,13 @@ public void multipleInequalityWithNestedField() throws Exception { .orderBy("name", Direction.DESCENDING); docSnap = collection.document("doc2").get().get(); Query query2WithCursor = query2.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query2, "doc2", "doc3"); - checkQuerySnapshotContainsDocuments(query2WithCursor, "doc2", "doc3"); + checkResultContainsDocumentsInOrder( + query2, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc2", "doc3"); + checkResultContainsDocumentsInOrder(query2WithCursor, "doc2", "doc3"); } @Test public void multipleInequalityWithCompositeFilters() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -632,8 +670,20 @@ public void multipleInequalityWithCompositeFilters() throws Exception { Filter.and(Filter.notEqualTo("key", "b"), Filter.greaterThan("v", 4)))); DocumentSnapshot docSnap = collection.document("doc1").get().get(); Query query1WithCursor = query1.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query1, "doc1", "doc6", "doc5", "doc4"); - checkQuerySnapshotContainsDocuments(query1WithCursor, "doc1", "doc6", "doc5", "doc4"); + checkResultContainsDocumentsInOrder( + query1, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc1", + "doc6", + "doc5", + "doc4"); + checkResultContainsDocumentsInOrder( + query1WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc1", + "doc6", + "doc5", + "doc4"); // Ordered by: 'sort' desc, 'key' asc, 'v' asc, __name__ asc Query query2 = @@ -646,8 +696,20 @@ public void multipleInequalityWithCompositeFilters() throws Exception { .orderBy("key"); docSnap = collection.document("doc5").get().get(); Query query2WithCursor = query2.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query2, "doc5", "doc4", "doc1", "doc6"); - checkQuerySnapshotContainsDocuments(query2WithCursor, "doc5", "doc4", "doc1", "doc6"); + checkResultContainsDocumentsInOrder( + query2, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc5", + "doc4", + "doc1", + "doc6"); + checkResultContainsDocumentsInOrder( + query2WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc5", + "doc4", + "doc1", + "doc6"); // Implicitly ordered by: 'key' asc, 'sort' asc, 'v' asc, __name__ asc Query query3 = @@ -662,19 +724,18 @@ public void multipleInequalityWithCompositeFilters() throws Exception { Filter.and(Filter.lessThan("key", "b"), Filter.greaterThan("v", 0))))); docSnap = collection.document("doc1").get().get(); Query query3WithCursor = query3.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query3, "doc1", "doc2"); - checkQuerySnapshotContainsDocuments(query3WithCursor, "doc1", "doc2"); + checkResultContainsDocumentsInOrder( + query3, /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), "doc1", "doc2"); + checkResultContainsDocumentsInOrder( + query3WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc1", + "doc2"); } @Test public void multipleInequalityFieldsWillBeImplicitlyOrderedLexicographicallyByServer() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -700,8 +761,20 @@ public void multipleInequalityFieldsWillBeImplicitlyOrderedLexicographicallyBySe .whereGreaterThan("sort", 1) .whereIn("v", asList(1, 2, 3, 4)); Query query1WithCursor = query1.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query1, "doc2", "doc4", "doc5", "doc3"); - checkQuerySnapshotContainsDocuments(query1WithCursor, "doc2", "doc4", "doc5", "doc3"); + checkResultContainsDocumentsInOrder( + query1, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc5", + "doc3"); + checkResultContainsDocumentsInOrder( + query1WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc5", + "doc3"); // Implicitly ordered by: 'key' asc, 'sort' asc, __name__ asc Query query2 = @@ -710,18 +783,24 @@ public void multipleInequalityFieldsWillBeImplicitlyOrderedLexicographicallyBySe .whereNotEqualTo("key", "a") .whereIn("v", asList(1, 2, 3, 4)); Query query2WithCursor = query2.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query2, "doc2", "doc4", "doc5", "doc3"); - checkQuerySnapshotContainsDocuments(query2WithCursor, "doc2", "doc4", "doc5", "doc3"); + checkResultContainsDocumentsInOrder( + query2, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc5", + "doc3"); + checkResultContainsDocumentsInOrder( + query2WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc5", + "doc3"); } @Test public void multipleInequalityWithMultipleExplicitOrderBy() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -744,8 +823,20 @@ public void multipleInequalityWithMultipleExplicitOrderBy() throws Exception { Query query1 = collection.whereGreaterThan("key", "a").whereGreaterThanOrEqualTo("sort", 1).orderBy("v"); Query query1WithCursor = query1.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query1, "doc2", "doc4", "doc3", "doc5"); - checkQuerySnapshotContainsDocuments(query1WithCursor, "doc2", "doc4", "doc3", "doc5"); + checkResultContainsDocumentsInOrder( + query1, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc3", + "doc5"); + checkResultContainsDocumentsInOrder( + query1WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc3", + "doc5"); // Ordered by: 'v asc, 'sort' asc, 'key' asc, __name__ asc Query query2 = @@ -755,8 +846,20 @@ public void multipleInequalityWithMultipleExplicitOrderBy() throws Exception { .orderBy("v") .orderBy("sort"); Query query2WithCursor = query2.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query2, "doc2", "doc5", "doc4", "doc3"); - checkQuerySnapshotContainsDocuments(query2WithCursor, "doc2", "doc5", "doc4", "doc3"); + checkResultContainsDocumentsInOrder( + query2, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc5", + "doc4", + "doc3"); + checkResultContainsDocumentsInOrder( + query2WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc5", + "doc4", + "doc3"); docSnap = collection.document("doc5").get().get(); @@ -768,8 +871,20 @@ public void multipleInequalityWithMultipleExplicitOrderBy() throws Exception { .whereGreaterThanOrEqualTo("sort", 1) .orderBy("v", Direction.DESCENDING); Query query3WithCursor = query3.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query3, "doc5", "doc3", "doc4", "doc2"); - checkQuerySnapshotContainsDocuments(query3WithCursor, "doc5", "doc3", "doc4", "doc2"); + checkResultContainsDocumentsInOrder( + query3, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc5", + "doc3", + "doc4", + "doc2"); + checkResultContainsDocumentsInOrder( + query3WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc5", + "doc3", + "doc4", + "doc2"); // Ordered by: 'v desc, 'sort' asc, 'key' asc, __name__ asc Query query4 = @@ -779,18 +894,24 @@ public void multipleInequalityWithMultipleExplicitOrderBy() throws Exception { .orderBy("v", Direction.DESCENDING) .orderBy("sort"); Query query4WithCursor = query4.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query4, "doc5", "doc4", "doc3", "doc2"); - checkQuerySnapshotContainsDocuments(query4WithCursor, "doc5", "doc4", "doc3", "doc2"); + checkResultContainsDocumentsInOrder( + query4, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc5", + "doc4", + "doc3", + "doc2"); + checkResultContainsDocumentsInOrder( + query4WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc5", + "doc4", + "doc3", + "doc2"); } @Test public void multipleInequalityFieldsInAggregateQuery() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -811,18 +932,24 @@ public void multipleInequalityFieldsInAggregateQuery() throws Exception { .whereGreaterThanOrEqualTo("sort", 1) .orderBy("v") .count(); - assertThat(query.get().get().getCount()).isEqualTo(4); + if (isRunningAgainstFirestoreEmulator(firestore)) { + assertThat(query.get().get().getCount()).isEqualTo(4); + } + assertThat( + query + .getQuery() + .getFirestore() + .pipeline() + .createFrom(query) + .execute() + .get() + .getResults()) + .isNotEmpty(); // TODO(MIEQ): Add sum and average when they are public. } @Test public void multipleInequalityFieldsWithDocumentKey() throws Exception { - // TODO(MIEQ): Enable this test against production when possible. - assumeTrue( - "Skip this test if running against production because multiple inequality is " - + "not supported yet.", - isRunningAgainstFirestoreEmulator(firestore)); - CollectionReference collection = testCollectionWithDocs( map( @@ -847,8 +974,18 @@ public void multipleInequalityFieldsWithDocumentKey() throws Exception { .whereNotEqualTo("key", "a") .whereLessThan(FieldPath.documentId(), "doc5"); Query query1WithCursor = query1.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query1, "doc2", "doc4", "doc3"); - checkQuerySnapshotContainsDocuments(query1WithCursor, "doc2", "doc4", "doc3"); + checkResultContainsDocumentsInOrder( + query1, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc3"); + checkResultContainsDocumentsInOrder( + query1WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc3"); // Changing filters order will not affect implicit order. // Implicitly ordered by: 'key' asc, 'sort' asc, __name__ asc @@ -858,8 +995,18 @@ public void multipleInequalityFieldsWithDocumentKey() throws Exception { .whereGreaterThan("sort", 1) .whereNotEqualTo("key", "a"); Query query2WithCursor = query2.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query2, "doc2", "doc4", "doc3"); - checkQuerySnapshotContainsDocuments(query2WithCursor, "doc2", "doc4", "doc3"); + checkResultContainsDocumentsInOrder( + query2, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc3"); + checkResultContainsDocumentsInOrder( + query2WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc4", + "doc3"); // Ordered by: 'sort' desc, 'key' desc, __name__ desc Query query3 = @@ -869,248 +1016,17 @@ public void multipleInequalityFieldsWithDocumentKey() throws Exception { .whereNotEqualTo("key", "a") .orderBy("sort", Direction.DESCENDING); Query query3WithCursor = query3.startAt(docSnap); - checkQuerySnapshotContainsDocuments(query3, "doc2", "doc3", "doc4"); - checkQuerySnapshotContainsDocuments(query3WithCursor, "doc2", "doc3", "doc4"); - } - - @Test - public void testQueryPlan() throws Exception { - Map> testDocs = - map( - "doc1", map("a", 1, "b", asList(0)), - "doc2", map("b", asList(1)), - "doc3", map("a", 3, "b", asList(2, 7), "c", 10), - "doc4", map("a", 1, "b", asList(3, 7)), - "doc5", map("a", 1), - "doc6", map("a", 2, "c", 20)); - CollectionReference collection = testCollectionWithDocs(testDocs); - - Query query = collection.where(Filter.equalTo("a", 1)).orderBy("a"); - ExplainResults explainResults = - query.explain(ExplainOptions.builder().setAnalyze(false).build()).get(); - - @Nullable QuerySnapshot snapshot = explainResults.getSnapshot(); - assertThat(snapshot).isNull(); - - ExplainMetrics metrics = explainResults.getMetrics(); - assertThat(metrics).isNotNull(); - - PlanSummary planSummary = metrics.getPlanSummary(); - assertThat(planSummary).isNotNull(); - assertThat(planSummary.getIndexesUsed()).isNotEmpty(); - - ExecutionStats stats = metrics.getExecutionStats(); - assertThat(stats).isNull(); - } - - @Test - public void testQueryProfile() throws Exception { - Map> testDocs = - map( - "doc1", map("a", 1, "b", asList(0)), - "doc2", map("b", asList(1)), - "doc3", map("a", 3, "b", asList(2, 7), "c", 10), - "doc4", map("a", 1, "b", asList(3, 7)), - "doc5", map("a", 1), - "doc6", map("a", 2, "c", 20)); - CollectionReference collection = testCollectionWithDocs(testDocs); - - Query query = collection.where(Filter.equalTo("a", 1)).orderBy("a"); - ExplainResults explainResults = - query.explain(ExplainOptions.builder().setAnalyze(true).build()).get(); - - @Nullable QuerySnapshot snapshot = explainResults.getSnapshot(); - assertThat(snapshot).isNotNull(); - assertThat(snapshot.size()).isEqualTo(3); - - ExplainMetrics metrics = explainResults.getMetrics(); - assertThat(metrics).isNotNull(); - - PlanSummary planSummary = metrics.getPlanSummary(); - assertThat(planSummary).isNotNull(); - assertThat(planSummary.getIndexesUsed()).isNotEmpty(); - - ExecutionStats stats = metrics.getExecutionStats(); - assertThat(stats).isNotNull(); - assertThat(stats.getDebugStats()).isNotEmpty(); - assertThat(stats.getReadOperations()).isEqualTo(3); - assertThat(stats.getResultsReturned()).isEqualTo(3); - assertThat(stats.getExecutionDuration()).isGreaterThan(Duration.ZERO); - } - - @Test - public void testQueryProfileForQueryWithNoResultSet() throws Exception { - Map> testDocs = - map( - "doc1", map("a", 1, "b", asList(0)), - "doc2", map("b", asList(1)), - "doc3", map("a", 3, "b", asList(2, 7), "c", 10), - "doc4", map("a", 1, "b", asList(3, 7)), - "doc5", map("a", 1), - "doc6", map("a", 2, "c", 20)); - CollectionReference collection = testCollectionWithDocs(testDocs); - - Query query = collection.where(Filter.equalTo("a", 100)).orderBy("a"); - - // Regular query execution (get). - QuerySnapshot getSnapshot = query.get().get(); - assertThat(getSnapshot.size()).isEqualTo(0); - - // Explain. - ExplainResults explainResults = - query.explain(ExplainOptions.builder().setAnalyze(true).build()).get(); - - @Nullable QuerySnapshot snapshot = explainResults.getSnapshot(); - assertThat(snapshot).isNotNull(); - assertThat(snapshot.size()).isEqualTo(0); - - ExplainMetrics metrics = explainResults.getMetrics(); - assertThat(metrics).isNotNull(); - - PlanSummary planSummary = metrics.getPlanSummary(); - assertThat(planSummary).isNotNull(); - assertThat(planSummary.getIndexesUsed()).isNotEmpty(); - - ExecutionStats stats = metrics.getExecutionStats(); - assertThat(stats).isNotNull(); - assertThat(stats.getDebugStats()).isNotEmpty(); - assertThat(stats.getReadOperations()).isGreaterThan(0); - assertThat(stats.getResultsReturned()).isEqualTo(0); - assertThat(stats.getExecutionDuration()).isGreaterThan(Duration.ZERO); - } - - @Test - public void testExplainStreamWithoutAnalyze() throws Exception { - CollectionReference collection = testCollectionWithDocs(Collections.emptyMap()); - Query query = collection.where(Filter.equalTo("a", 1)).orderBy("a"); - - ApiFuture metricsFuture = - query.explainStream( - ExplainOptions.builder().setAnalyze(false).build(), - new ApiStreamObserver() { - @Override - public void onNext(DocumentSnapshot documentSnapshot) { - fail("No DocumentSnapshot should be received because analyze option was disabled."); - } - - @Override - public void onError(Throwable throwable) { - fail(throwable.getMessage()); - } - - @Override - public void onCompleted() {} - }); - - ExplainMetrics metrics = metricsFuture.get(); - assertThat(metrics.getPlanSummary().getIndexesUsed().size()).isGreaterThan(0); - assertThat(metrics.getExecutionStats()).isNull(); - } - - @Test - public void testExplainStreamWithAnalyze() throws Exception { - Map> testDocs = - map( - "doc1", map("a", 1, "b", asList(0)), - "doc2", map("b", asList(1)), - "doc3", map("a", 3, "b", asList(2, 7), "c", 10), - "doc4", map("a", 1, "b", asList(3, 7)), - "doc5", map("a", 1), - "doc6", map("a", 2, "c", 20)); - CollectionReference collection = testCollectionWithDocs(testDocs); - - Query query = collection.where(Filter.equalTo("a", 1)).orderBy("a"); - - final Iterator iterator = Arrays.asList("doc1", "doc4", "doc5").iterator(); - - ApiFuture metricsFuture = - query.explainStream( - ExplainOptions.builder().setAnalyze(true).build(), - new ApiStreamObserver() { - @Override - public void onNext(DocumentSnapshot documentSnapshot) { - assertEquals(iterator.next(), documentSnapshot.getId()); - } - - @Override - public void onError(Throwable throwable) { - fail(throwable.getMessage()); - } - - @Override - public void onCompleted() {} - }); - - ExplainMetrics metrics = metricsFuture.get(); - assertThat(metrics.getPlanSummary().getIndexesUsed().size()).isGreaterThan(0); - assertThat(metrics.getExecutionStats()).isNotNull(); - assertThat(metrics.getExecutionStats().getResultsReturned()).isEqualTo(3); - } - - @Test - public void testAggregateQueryPlan() throws Exception { - Map> testDocs = - map( - "doc1", map("a", 1, "b", asList(0)), - "doc2", map("b", asList(1)), - "doc3", map("a", 3, "b", asList(2, 7), "c", 10), - "doc4", map("a", 1, "b", asList(3, 7)), - "doc5", map("a", 1), - "doc6", map("a", 2, "c", 20)); - CollectionReference collection = testCollectionWithDocs(testDocs); - - AggregateQuery query = collection.where(Filter.equalTo("a", 1)).orderBy("a").count(); - - ExplainResults explainResults = - query.explain(ExplainOptions.builder().setAnalyze(false).build()).get(); - - @Nullable AggregateQuerySnapshot snapshot = explainResults.getSnapshot(); - assertThat(snapshot).isNull(); - - ExplainMetrics metrics = explainResults.getMetrics(); - assertThat(metrics).isNotNull(); - - PlanSummary planSummary = metrics.getPlanSummary(); - assertThat(planSummary).isNotNull(); - assertThat(planSummary.getIndexesUsed()).isNotEmpty(); - - ExecutionStats stats = metrics.getExecutionStats(); - assertThat(stats).isNull(); - } - - @Test - public void testAggregateQueryProfile() throws Exception { - Map> testDocs = - map( - "doc1", map("a", 1, "b", asList(0)), - "doc2", map("b", asList(1)), - "doc3", map("a", 3, "b", asList(2, 7), "c", 10), - "doc4", map("a", 1, "b", asList(3, 7)), - "doc5", map("a", 1), - "doc6", map("a", 2, "c", 20)); - CollectionReference collection = testCollectionWithDocs(testDocs); - - AggregateQuery query = collection.where(Filter.equalTo("a", 1)).orderBy("a").count(); - - ExplainResults explainResults = - query.explain(ExplainOptions.builder().setAnalyze(true).build()).get(); - - @Nullable AggregateQuerySnapshot snapshot = explainResults.getSnapshot(); - assertThat(snapshot).isNotNull(); - assertThat(snapshot.getCount()).isEqualTo(3); - - ExplainMetrics metrics = explainResults.getMetrics(); - assertThat(metrics).isNotNull(); - - PlanSummary planSummary = metrics.getPlanSummary(); - assertThat(planSummary).isNotNull(); - assertThat(planSummary.getIndexesUsed()).isNotEmpty(); - - ExecutionStats stats = metrics.getExecutionStats(); - assertThat(stats).isNotNull(); - assertThat(stats.getDebugStats()).isNotEmpty(); - assertThat(stats.getReadOperations()).isEqualTo(1); - assertThat(stats.getResultsReturned()).isEqualTo(1); - assertThat(stats.getExecutionDuration()).isGreaterThan(Duration.ZERO); + checkResultContainsDocumentsInOrder( + query3, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc3", + "doc4"); + checkResultContainsDocumentsInOrder( + query3WithCursor, + /*pipelineOnly*/ !isRunningAgainstFirestoreEmulator(firestore), + "doc2", + "doc3", + "doc4"); } } diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryToPipelineTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryToPipelineTest.java new file mode 100644 index 000000000..7c6f7d3d0 --- /dev/null +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITQueryToPipelineTest.java @@ -0,0 +1,626 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.it; + +import static com.google.cloud.firestore.it.ITQueryTest.map; +import static org.junit.Assert.assertEquals; + +import com.google.cloud.firestore.CollectionReference; +import com.google.cloud.firestore.DocumentSnapshot; +import com.google.cloud.firestore.FieldPath; +import com.google.cloud.firestore.Filter; +import com.google.cloud.firestore.LocalFirestoreHelper; +import com.google.cloud.firestore.PipelineResult; +import com.google.cloud.firestore.Query; +import com.google.common.collect.ImmutableMap; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ITQueryToPipelineTest extends ITBaseTest { + + public CollectionReference testCollectionWithDocs(Map> docs) + throws ExecutionException, InterruptedException, TimeoutException { + CollectionReference collection = firestore.collection(LocalFirestoreHelper.autoId()); + for (Map.Entry> doc : docs.entrySet()) { + collection.document(doc.getKey()).set(doc.getValue()).get(5, TimeUnit.SECONDS); + } + return collection; + } + + List> data(List results) { + return results.stream().map(PipelineResult::getData).collect(Collectors.toList()); + } + + @Before + public void setup() throws Exception {} + + private Object normalizeNumbers(Object value) { + if (value instanceof Number) { + if (value instanceof Double || value instanceof Float) { + return ((Number) value).doubleValue(); + } + return ((Number) value).longValue(); + } + if (value instanceof List) { + return ((List) value).stream().map(this::normalizeNumbers).collect(Collectors.toList()); + } + if (value instanceof Map) { + Map newMap = new HashMap<>(); + ((Map) value).forEach((k, v) -> newMap.put((String) k, normalizeNumbers(v))); + return newMap; + } + return value; + } + + private Map normalizeMap(Map map) { + Map newMap = new HashMap<>(); + map.forEach((key, value) -> newMap.put(key, normalizeNumbers(value))); + return newMap; + } + + private void verifyResults(List actual, Map... expected) { + List> actualData = data(actual); + assertEquals(expected.length, actualData.size()); + for (int i = 0; i < expected.length; ++i) { + Map expectedMap = normalizeMap(expected[i]); + Map actualMap = normalizeMap(actualData.get(i)); + assertEquals(expectedMap, actualMap); + } + } + + @Test + public void supportsDefaultQuery() throws Exception { + CollectionReference collRef = testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L))); + List snapshot = + firestore.pipeline().createFrom(collRef).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + } + + @Test + public void supportsFilteredQuery() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.whereEqualTo("foo", 1L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + } + + @Test + public void supportsFilteredQueryWithFieldPath() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.whereEqualTo(FieldPath.of("foo"), 1L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + } + + @Test + public void supportsOrderedQueryWithDefaultOrder() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo"); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L), map("foo", 2L)); + } + + @Test + public void supportsOrderedQueryWithAsc() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo", Query.Direction.ASCENDING); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L), map("foo", 2L)); + } + + @Test + public void supportsOrderedQueryWithDesc() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo", Query.Direction.DESCENDING); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L), map("foo", 1L)); + } + + @Test + public void supportsLimitQuery() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo").limit(1); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + } + + @Test + public void supportsLimitToLastQuery() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L), "3", map("foo", 3L))); + Query query1 = collRef.orderBy("foo").limitToLast(2); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L), map("foo", 3L)); + } + + @Test + public void supportsStartAt() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo").startAt(2L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L)); + } + + @Test + public void supportsStartAtWithLimitToLast() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L), + "2", map("foo", 2L), + "3", map("foo", 3L), + "4", map("foo", 4L), + "5", map("foo", 5L))); + Query query1 = collRef.orderBy("foo").startAt(3L).limitToLast(4); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 3L), map("foo", 4L), map("foo", 5L)); + } + + @Test + public void supportsEndAtWithLimitToLast() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L), + "2", map("foo", 2L), + "3", map("foo", 3L), + "4", map("foo", 4L), + "5", map("foo", 5L))); + Query query1 = collRef.orderBy("foo").endAt(3L).limitToLast(2); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L), map("foo", 3L)); + } + + @Test + public void supportsStartAfterWithDocumentSnapshot() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.>builder() + .put("1", map("id", 1L, "foo", 1L, "bar", 1L, "baz", 1L)) + .put("2", map("id", 2L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("3", map("id", 3L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("4", map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L)) + .put("5", map("id", 5L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("6", map("id", 6L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("7", map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L)) + .put("8", map("id", 8L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("9", map("id", 9L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("10", map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L)) + .put("11", map("id", 11L, "foo", 2L, "bar", 2L, "baz", 2L)) + .put("12", map("id", 12L, "foo", 2L, "bar", 2L, "baz", 2L)) + .build()); + DocumentSnapshot docRef = collRef.document("2").get().get(); + Query query1 = collRef.orderBy("foo").orderBy("bar").orderBy("baz").startAfter(docRef); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults( + snapshot, + map("id", 3L, "foo", 1L, "bar", 1L, "baz", 2L), + map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L), + map("id", 5L, "foo", 1L, "bar", 2L, "baz", 2L), + map("id", 6L, "foo", 1L, "bar", 2L, "baz", 2L), + map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L), + map("id", 8L, "foo", 2L, "bar", 1L, "baz", 2L), + map("id", 9L, "foo", 2L, "bar", 1L, "baz", 2L), + map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L), + map("id", 11L, "foo", 2L, "bar", 2L, "baz", 2L), + map("id", 12L, "foo", 2L, "bar", 2L, "baz", 2L)); + } + + @Test + public void supportsStartAtWithDocumentSnapshot() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.>builder() + .put("1", map("id", 1L, "foo", 1L, "bar", 1L, "baz", 1L)) + .put("2", map("id", 2L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("3", map("id", 3L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("4", map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L)) + .put("5", map("id", 5L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("6", map("id", 6L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("7", map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L)) + .put("8", map("id", 8L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("9", map("id", 9L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("10", map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L)) + .put("11", map("id", 11L, "foo", 2L, "bar", 2L, "baz", 2L)) + .put("12", map("id", 12L, "foo", 2L, "bar", 2L, "baz", 2L)) + .build()); + DocumentSnapshot docRef = collRef.document("2").get().get(); + Query query1 = collRef.orderBy("foo").orderBy("bar").orderBy("baz").startAt(docRef); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults( + snapshot, + map("id", 2L, "foo", 1L, "bar", 1L, "baz", 2L), + map("id", 3L, "foo", 1L, "bar", 1L, "baz", 2L), + map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L), + map("id", 5L, "foo", 1L, "bar", 2L, "baz", 2L), + map("id", 6L, "foo", 1L, "bar", 2L, "baz", 2L), + map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L), + map("id", 8L, "foo", 2L, "bar", 1L, "baz", 2L), + map("id", 9L, "foo", 2L, "bar", 1L, "baz", 2L), + map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L), + map("id", 11L, "foo", 2L, "bar", 2L, "baz", 2L), + map("id", 12L, "foo", 2L, "bar", 2L, "baz", 2L)); + } + + @Test + public void supportsStartAfter() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo").startAfter(1L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L)); + } + + @Test + public void supportsEndAt() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo").endAt(1L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + } + + @Test + public void supportsEndBefore() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo").endBefore(2L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + } + + @Test + public void supportsPagination() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo").limit(1); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + + Query query2 = query1.startAfter(snapshot.get(0).get("foo")); + snapshot = firestore.pipeline().createFrom(query2).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L)); + } + + @Test + public void supportsPaginationOnDocumentIds() throws Exception { + CollectionReference collRef = + testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L), "2", map("foo", 2L))); + Query query1 = collRef.orderBy("foo").orderBy(FieldPath.documentId()).limit(1); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L)); + + Query query2 = + query1.startAfter(snapshot.get(0).get("foo"), snapshot.get(0).getReference().getId()); + snapshot = firestore.pipeline().createFrom(query2).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L)); + } + + @Test + public void supportsCollectionGroups() throws Exception { + CollectionReference collRef = testCollectionWithDocs(ImmutableMap.of()); + String collectionGroupId = collRef.getId() + "group"; + + firestore + .document(collRef.getId() + "/foo/" + collectionGroupId + "/doc1") + .set(map("foo", 1L)) + .get(); + firestore + .document(collRef.getId() + "/bar/baz/boo/" + collectionGroupId + "/doc2") + .set(map("bar", 1L)) + .get(); + + Query query1 = firestore.collectionGroup(collectionGroupId).orderBy(FieldPath.documentId()); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + + verifyResults(snapshot, map("bar", 1L), map("foo", 1L)); + } + + @Test + public void supportsQueryOverCollectionPathWithSpecialCharacters() throws Exception { + CollectionReference collRef = testCollectionWithDocs(ImmutableMap.of()); + CollectionReference collectionWithSpecials = + collRef.document("so!@#$%^&*()_+special").collection("so!@#$%^&*()_+special"); + collectionWithSpecials.add(map("foo", 1L)).get(); + collectionWithSpecials.add(map("foo", 2L)).get(); + + Query query = collectionWithSpecials.orderBy("foo", Query.Direction.ASCENDING); + List snapshot = + firestore.pipeline().createFrom(query).execute().get().getResults(); + + verifyResults(snapshot, map("foo", 1L), map("foo", 2L)); + } + + @Test + public void supportsMultipleInequalityOnSameField() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.>builder() + .put("01", map("id", 1L, "foo", 1L, "bar", 1L, "baz", 1L)) + .put("02", map("id", 2L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("03", map("id", 3L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("04", map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L)) + .put("05", map("id", 5L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("06", map("id", 6L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("07", map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L)) + .put("08", map("id", 8L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("09", map("id", 9L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("10", map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L)) + .put("11", map("id", 11L, "foo", 2L, "bar", 2L, "baz", 2L)) + .put("12", map("id", 12L, "foo", 2L, "bar", 2L, "baz", 2L)) + .build()); + Query query1 = + collRef.where( + Filter.and(Filter.greaterThan("id", 2L), Filter.lessThanOrEqualTo("id", 10L))); + List snapshot = + firestore.pipeline().createFrom(query1.orderBy("id")).execute().get().getResults(); + verifyResults( + snapshot, + map("id", 3L, "foo", 1L, "bar", 1L, "baz", 2L), + map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L), + map("id", 5L, "foo", 1L, "bar", 2L, "baz", 2L), + map("id", 6L, "foo", 1L, "bar", 2L, "baz", 2L), + map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L), + map("id", 8L, "foo", 2L, "bar", 1L, "baz", 2L), + map("id", 9L, "foo", 2L, "bar", 1L, "baz", 2L), + map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L)); + } + + @Test + public void supportsMultipleInequalityOnDifferentFields() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.>builder() + .put("01", map("id", 1L, "foo", 1L, "bar", 1L, "baz", 1L)) + .put("02", map("id", 2L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("03", map("id", 3L, "foo", 1L, "bar", 1L, "baz", 2L)) + .put("04", map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L)) + .put("05", map("id", 5L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("06", map("id", 6L, "foo", 1L, "bar", 2L, "baz", 2L)) + .put("07", map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L)) + .put("08", map("id", 8L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("09", map("id", 9L, "foo", 2L, "bar", 1L, "baz", 2L)) + .put("10", map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L)) + .put("11", map("id", 11L, "foo", 2L, "bar", 2L, "baz", 2L)) + .put("12", map("id", 12L, "foo", 2L, "bar", 2L, "baz", 2L)) + .build()); + Query query1 = + collRef.where( + Filter.and(Filter.greaterThanOrEqualTo("id", 2L), Filter.lessThan("baz", 2L))); + List snapshot = + firestore.pipeline().createFrom(query1.orderBy("id")).execute().get().getResults(); + verifyResults( + snapshot, + map("id", 4L, "foo", 1L, "bar", 2L, "baz", 1L), + map("id", 7L, "foo", 2L, "bar", 1L, "baz", 1L), + map("id", 10L, "foo", 2L, "bar", 2L, "baz", 1L)); + } + + @Test + public void supportsCollectionGroupQuery() throws Exception { + CollectionReference collRef = testCollectionWithDocs(ImmutableMap.of("1", map("foo", 1L))); + List snapshot = + firestore + .pipeline() + .createFrom(firestore.collectionGroup(collRef.getId())) + .execute() + .get() + .getResults(); + verifyResults(snapshot, map("foo", 1L)); + } + + @Test + public void supportsEqNan() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", Double.NaN), + "2", map("foo", 2L, "bar", 1L), + "3", map("foo", 3L, "bar", "bar"))); + Query query1 = collRef.whereEqualTo("bar", Double.NaN); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L, "bar", Double.NaN)); + } + + @Test + public void supportsNeqNan() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", Double.NaN), + "2", map("foo", 2L, "bar", 1L), + "3", map("foo", 3L, "bar", "bar"))); + Query query1 = collRef.whereNotEqualTo("bar", Double.NaN).orderBy("foo"); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L, "bar", 1L)); + } + + @Test + public void supportsEqNull() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of("1", map("foo", 1L, "bar", null), "2", map("foo", 2L, "bar", 1L))); + Query query1 = collRef.whereEqualTo("bar", null); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L, "bar", null)); + } + + @Test + public void supportsNeqNull() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of("1", map("foo", 1L, "bar", null), "2", map("foo", 2L, "bar", 1L))); + Query query1 = collRef.whereNotEqualTo("bar", null); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L, "bar", 1L)); + } + + @Test + public void supportsNeq() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of("1", map("foo", 1L, "bar", 0L), "2", map("foo", 2L, "bar", 1L))); + Query query1 = collRef.whereNotEqualTo("bar", 0L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 2L, "bar", 1L)); + } + + @Test + public void supportsArrayContains() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", Arrays.asList(0L, 2L, 4L, 6L)), + "2", map("foo", 2L, "bar", Arrays.asList(1L, 3L, 5L, 7L)))); + Query query1 = collRef.whereArrayContains("bar", 4L); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L, "bar", Arrays.asList(0L, 2L, 4L, 6L))); + } + + @Test + public void supportsArrayContainsAny() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", Arrays.asList(0L, 2L, 4L, 6L)), + "2", map("foo", 2L, "bar", Arrays.asList(1L, 3L, 5L, 7L)), + "3", map("foo", 3L, "bar", Arrays.asList(10L, 20L, 30L, 40L)))); + Query query1 = collRef.whereArrayContainsAny("bar", Arrays.asList(4L, 5L)); + List snapshot = + firestore.pipeline().createFrom(query1.orderBy("foo")).execute().get().getResults(); + verifyResults( + snapshot, + map("foo", 1L, "bar", Arrays.asList(0L, 2L, 4L, 6L)), + map("foo", 2L, "bar", Arrays.asList(1L, 3L, 5L, 7L))); + } + + @Test + public void supportsIn() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", 2L), + "2", map("foo", 2L), + "3", map("foo", 3L, "bar", 10L))); + Query query1 = collRef.whereIn("bar", Arrays.asList(0L, 10L, 20L)); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 3L, "bar", 10L)); + } + + @Test + public void supportsInWith1() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", 2L), + "2", map("foo", 2L), + "3", map("foo", 3L, "bar", 10L))); + Query query1 = collRef.whereIn("bar", Arrays.asList(2L)); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L, "bar", 2L)); + } + + @Test + public void supportsNotIn() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", 2L), + "2", map("foo", 2L, "bar", 1L), + "3", map("foo", 3L, "bar", 10L))); + Query query1 = collRef.whereNotIn("bar", Arrays.asList(0L, 10L, 20L)).orderBy("foo"); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L, "bar", 2L), map("foo", 2L, "bar", 1L)); + } + + @Test + public void supportsNotInWith1() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", 2L), + "2", map("foo", 2L), + "3", map("foo", 3L, "bar", 10L))); + Query query1 = collRef.whereNotIn("bar", Arrays.asList(2L)).orderBy("foo"); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 3L, "bar", 10L)); + } + + @Test + public void supportsOrOperator() throws Exception { + CollectionReference collRef = + testCollectionWithDocs( + ImmutableMap.of( + "1", map("foo", 1L, "bar", 2L), + "2", map("foo", 2L, "bar", 0L), + "3", map("foo", 3L, "bar", 10L))); + Query query1 = + collRef + .where(Filter.or(Filter.equalTo("bar", 2L), Filter.equalTo("foo", 3L))) + .orderBy("foo"); + List snapshot = + firestore.pipeline().createFrom(query1).execute().get().getResults(); + verifyResults(snapshot, map("foo", 1L, "bar", 2L), map("foo", 3L, "bar", 10L)); + } +} diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITShutdownTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITShutdownTest.java index 6683c3350..f6ca62e9d 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITShutdownTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITShutdownTest.java @@ -17,6 +17,7 @@ package com.google.cloud.firestore.it; import static org.junit.Assert.fail; +import static org.junit.Assume.assumeFalse; import com.google.api.core.SettableApiFuture; import com.google.cloud.firestore.Firestore; @@ -50,6 +51,13 @@ public void closeSuccess_withListenerRemove() throws Exception { @Test public void closeFailure_withoutListenerRemove() throws Exception { + // TODO(pipeline): This test fails against emulator, suggesting the test setup probably depends + // on timing. + // We should fix it. + assumeFalse( + "Skip this test when running against the emulator because it depends on timing.", + TestHelper.isRunningAgainstFirestoreEmulator(firestore)); + final Firestore fs = FirestoreOptions.getDefaultInstance().getService(); attachListener(fs); diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java index 75214c873..566de2280 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java @@ -37,6 +37,7 @@ import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue; import com.google.api.core.ApiFuture; @@ -904,6 +905,11 @@ public void endBefore() throws Exception { @Test public void partitionedQuery() throws Exception { + // Partitioned queries are not supported in the emulator. + assumeFalse( + "Skip this test when running against the Firestore emulator because it does not support partitioned queries.", + isRunningAgainstFirestoreEmulator(firestore)); + int documentCount = 2 * 128 + 127; // Minimum partition size is 128. WriteBatch batch = firestore.batch(); @@ -932,6 +938,11 @@ public void partitionedQuery() throws Exception { @Test public void partitionedQuery_future() throws Exception { + // Partitioned queries are not supported in the emulator. + assumeFalse( + "Skip this test when running against the Firestore emulator because it does not support partitioned queries.", + isRunningAgainstFirestoreEmulator(firestore)); + int documentCount = 2 * 128 + 127; // Minimum partition size is 128. WriteBatch batch = firestore.batch(); @@ -960,6 +971,11 @@ public void partitionedQuery_future() throws Exception { @Test public void emptyPartitionedQuery() throws Exception { + // Partitioned queries are not supported in the emulator. + assumeFalse( + "Skip this test when running against the Firestore emulator because it does not support partitioned queries.", + isRunningAgainstFirestoreEmulator(firestore)); + StreamConsumer consumer = new StreamConsumer<>(); firestore.collectionGroup(randomColl.getId()).getPartitions(3, consumer); final List partitions = consumer.consume().get(); @@ -1073,7 +1089,7 @@ public void successfulTransactionWithContention() throws Exception { assertEquals("foo", firstTransaction.get()); assertEquals("bar", secondTransaction.get()); - assertEquals(3, attempts.intValue()); + assertThat(attempts.intValue()).isAtLeast(3); assertEquals(3, (long) documentReference.get().get().getLong("counter")); } @@ -1999,6 +2015,11 @@ public void readOnlyTransaction_successfulRead() throws Exception { @Test public void readOnlyTransaction_failureWhenAttemptReadOlderThan60Seconds() throws ExecutionException, InterruptedException, TimeoutException { + // Skip this test because emulator does not have this behavior. + assumeFalse( + "Skip this test when running against the emulator because it does not have this behavior.", + TestHelper.isRunningAgainstFirestoreEmulator(firestore)); + final DocumentReference documentReference = randomColl.add(SINGLE_FIELD_MAP).get(); // Exception isn't thrown until 60 minutes. diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITTracingTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITTracingTest.java index 46e8294e1..b5638d0be 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITTracingTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITTracingTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeFalse; import com.google.cloud.firestore.BulkWriter; import com.google.cloud.firestore.BulkWriterOptions; @@ -148,6 +149,10 @@ public void before() { } firestore = optionsBuilder.build().getService(); + assumeFalse( + "ITTracingTest is not supported against the emulator.", + "EMULATOR".equals(ITBaseTest.getTargetBackend())); + // Clean up existing maps. spanNameToSpanId.clear(); spanIdToParentSpanId.clear(); diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/TestHelper.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/TestHelper.java index 54cfd86f0..ad851e4be 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/TestHelper.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/TestHelper.java @@ -28,7 +28,7 @@ private TestHelper() {} /** Returns whether the tests are running against the Firestore emulator. */ static boolean isRunningAgainstFirestoreEmulator(Firestore firestore) { - return firestore.getOptions().getHost().startsWith("localhost:"); + return firestore.getOptions().getEmulatorHost() != null; } /** diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientHttpJsonTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientHttpJsonTest.java index 86e0c966a..6078e1c9f 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientHttpJsonTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientHttpJsonTest.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. @@ -483,6 +483,17 @@ public void runQueryExceptionTest() throws Exception { mockService.addException(exception); } + @Test + public void executePipelineTest() throws Exception {} + + @Test + public void executePipelineExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + @Test public void runAggregationQueryTest() throws Exception {} diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java index 885ebc7b9..ce9f08bbc 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.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. @@ -47,8 +47,11 @@ import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; import com.google.firestore.v1.DocumentMask; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.ExplainMetrics; import com.google.firestore.v1.ExplainOptions; +import com.google.firestore.v1.ExplainStats; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; import com.google.firestore.v1.ListCollectionIdsResponse; @@ -551,6 +554,53 @@ public void runQueryExceptionTest() throws Exception { } } + @Test + public void executePipelineTest() throws Exception { + ExecutePipelineResponse expectedResponse = + ExecutePipelineResponse.newBuilder() + .setTransaction(ByteString.EMPTY) + .addAllResults(new ArrayList()) + .setExecutionTime(Timestamp.newBuilder().build()) + .setExplainStats(ExplainStats.newBuilder().build()) + .build(); + mockFirestore.addResponse(expectedResponse); + ExecutePipelineRequest request = + ExecutePipelineRequest.newBuilder().setDatabase("database1789464955").build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.executePipelineCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void executePipelineExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestore.addException(exception); + ExecutePipelineRequest request = + ExecutePipelineRequest.newBuilder().setDatabase("database1789464955").build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.executePipelineCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void runAggregationQueryTest() throws Exception { RunAggregationQueryResponse expectedResponse = diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestore.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestore.java index 9086a9deb..e358d0b19 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestore.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestore.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/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java index 7de1495d4..322b1505e 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.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. @@ -28,6 +28,8 @@ import com.google.firestore.v1.CreateDocumentRequest; import com.google.firestore.v1.DeleteDocumentRequest; import com.google.firestore.v1.Document; +import com.google.firestore.v1.ExecutePipelineRequest; +import com.google.firestore.v1.ExecutePipelineResponse; import com.google.firestore.v1.FirestoreGrpc.FirestoreImplBase; import com.google.firestore.v1.GetDocumentRequest; import com.google.firestore.v1.ListCollectionIdsRequest; @@ -273,6 +275,27 @@ public void runQuery(RunQueryRequest request, StreamObserver r } } + @Override + public void executePipeline( + ExecutePipelineRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ExecutePipelineResponse) { + requests.add(request); + responseObserver.onNext(((ExecutePipelineResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecutePipeline, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ExecutePipelineResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void runAggregationQuery( RunAggregationQueryRequest request, diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockLocations.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockLocations.java index 10cecbc88..3465c6551 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockLocations.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockLocations.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/src/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.java index 6e12a2e8d..72512ff57 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockLocationsImpl.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/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml b/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml index 802da77da..9d1dca2fd 100644 --- a/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml +++ b/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml @@ -51,4 +51,44 @@ com/google/firestore/admin/v1/FirestoreAdminGrpc* void bulkDeleteDocuments(com.google.firestore.admin.v1.BulkDeleteDocumentsRequest, io.grpc.stub.StreamObserver) + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void cloneDatabase(com.google.firestore.admin.v1.CloneDatabaseRequest, io.grpc.stub.StreamObserver) + + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void createUserCreds(com.google.firestore.admin.v1.CreateUserCredsRequest, io.grpc.stub.StreamObserver) + + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void deleteUserCreds(com.google.firestore.admin.v1.DeleteUserCredsRequest, io.grpc.stub.StreamObserver) + + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void disableUserCreds(com.google.firestore.admin.v1.DisableUserCredsRequest, io.grpc.stub.StreamObserver) + + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void enableUserCreds(com.google.firestore.admin.v1.EnableUserCredsRequest, io.grpc.stub.StreamObserver) + + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void getUserCreds(com.google.firestore.admin.v1.GetUserCredsRequest, io.grpc.stub.StreamObserver) + + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void listUserCreds(com.google.firestore.admin.v1.ListUserCredsRequest, io.grpc.stub.StreamObserver) + + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void resetUserPassword(com.google.firestore.admin.v1.ResetUserPasswordRequest, io.grpc.stub.StreamObserver) + diff --git a/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java b/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java index a25e4538f..a8e23a2c1 100644 --- a/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java +++ b/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.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. @@ -710,6 +710,326 @@ private FirestoreAdminGrpc() {} return getDeleteDatabaseMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getCreateUserCredsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateUserCreds", + requestType = com.google.firestore.admin.v1.CreateUserCredsRequest.class, + responseType = com.google.firestore.admin.v1.UserCreds.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getCreateUserCredsMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getCreateUserCredsMethod; + if ((getCreateUserCredsMethod = FirestoreAdminGrpc.getCreateUserCredsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getCreateUserCredsMethod = FirestoreAdminGrpc.getCreateUserCredsMethod) == null) { + FirestoreAdminGrpc.getCreateUserCredsMethod = + getCreateUserCredsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateUserCreds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.CreateUserCredsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.UserCreds.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("CreateUserCreds")) + .build(); + } + } + } + return getCreateUserCredsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getGetUserCredsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetUserCreds", + requestType = com.google.firestore.admin.v1.GetUserCredsRequest.class, + responseType = com.google.firestore.admin.v1.UserCreds.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getGetUserCredsMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getGetUserCredsMethod; + if ((getGetUserCredsMethod = FirestoreAdminGrpc.getGetUserCredsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getGetUserCredsMethod = FirestoreAdminGrpc.getGetUserCredsMethod) == null) { + FirestoreAdminGrpc.getGetUserCredsMethod = + getGetUserCredsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUserCreds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.GetUserCredsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.UserCreds.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("GetUserCreds")) + .build(); + } + } + } + return getGetUserCredsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListUserCredsRequest, + com.google.firestore.admin.v1.ListUserCredsResponse> + getListUserCredsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListUserCreds", + requestType = com.google.firestore.admin.v1.ListUserCredsRequest.class, + responseType = com.google.firestore.admin.v1.ListUserCredsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListUserCredsRequest, + com.google.firestore.admin.v1.ListUserCredsResponse> + getListUserCredsMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListUserCredsRequest, + com.google.firestore.admin.v1.ListUserCredsResponse> + getListUserCredsMethod; + if ((getListUserCredsMethod = FirestoreAdminGrpc.getListUserCredsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getListUserCredsMethod = FirestoreAdminGrpc.getListUserCredsMethod) == null) { + FirestoreAdminGrpc.getListUserCredsMethod = + getListUserCredsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListUserCreds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ListUserCredsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ListUserCredsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("ListUserCreds")) + .build(); + } + } + } + return getListUserCredsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.EnableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getEnableUserCredsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "EnableUserCreds", + requestType = com.google.firestore.admin.v1.EnableUserCredsRequest.class, + responseType = com.google.firestore.admin.v1.UserCreds.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.EnableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getEnableUserCredsMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.EnableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getEnableUserCredsMethod; + if ((getEnableUserCredsMethod = FirestoreAdminGrpc.getEnableUserCredsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getEnableUserCredsMethod = FirestoreAdminGrpc.getEnableUserCredsMethod) == null) { + FirestoreAdminGrpc.getEnableUserCredsMethod = + getEnableUserCredsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EnableUserCreds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.EnableUserCredsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.UserCreds.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("EnableUserCreds")) + .build(); + } + } + } + return getEnableUserCredsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DisableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getDisableUserCredsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DisableUserCreds", + requestType = com.google.firestore.admin.v1.DisableUserCredsRequest.class, + responseType = com.google.firestore.admin.v1.UserCreds.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DisableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getDisableUserCredsMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DisableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds> + getDisableUserCredsMethod; + if ((getDisableUserCredsMethod = FirestoreAdminGrpc.getDisableUserCredsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getDisableUserCredsMethod = FirestoreAdminGrpc.getDisableUserCredsMethod) == null) { + FirestoreAdminGrpc.getDisableUserCredsMethod = + getDisableUserCredsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DisableUserCreds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.DisableUserCredsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.UserCreds.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("DisableUserCreds")) + .build(); + } + } + } + return getDisableUserCredsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ResetUserPasswordRequest, + com.google.firestore.admin.v1.UserCreds> + getResetUserPasswordMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResetUserPassword", + requestType = com.google.firestore.admin.v1.ResetUserPasswordRequest.class, + responseType = com.google.firestore.admin.v1.UserCreds.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ResetUserPasswordRequest, + com.google.firestore.admin.v1.UserCreds> + getResetUserPasswordMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ResetUserPasswordRequest, + com.google.firestore.admin.v1.UserCreds> + getResetUserPasswordMethod; + if ((getResetUserPasswordMethod = FirestoreAdminGrpc.getResetUserPasswordMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getResetUserPasswordMethod = FirestoreAdminGrpc.getResetUserPasswordMethod) == null) { + FirestoreAdminGrpc.getResetUserPasswordMethod = + getResetUserPasswordMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResetUserPassword")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ResetUserPasswordRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.UserCreds.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("ResetUserPassword")) + .build(); + } + } + } + return getResetUserPasswordMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteUserCredsRequest, com.google.protobuf.Empty> + getDeleteUserCredsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteUserCreds", + requestType = com.google.firestore.admin.v1.DeleteUserCredsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteUserCredsRequest, com.google.protobuf.Empty> + getDeleteUserCredsMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteUserCredsRequest, com.google.protobuf.Empty> + getDeleteUserCredsMethod; + if ((getDeleteUserCredsMethod = FirestoreAdminGrpc.getDeleteUserCredsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getDeleteUserCredsMethod = FirestoreAdminGrpc.getDeleteUserCredsMethod) == null) { + FirestoreAdminGrpc.getDeleteUserCredsMethod = + getDeleteUserCredsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteUserCreds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.DeleteUserCredsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("DeleteUserCreds")) + .build(); + } + } + } + return getDeleteUserCredsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.firestore.admin.v1.GetBackupRequest, com.google.firestore.admin.v1.Backup> getGetBackupMethod; @@ -1123,6 +1443,49 @@ private FirestoreAdminGrpc() {} return getDeleteBackupScheduleMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CloneDatabaseRequest, com.google.longrunning.Operation> + getCloneDatabaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CloneDatabase", + requestType = com.google.firestore.admin.v1.CloneDatabaseRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CloneDatabaseRequest, com.google.longrunning.Operation> + getCloneDatabaseMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CloneDatabaseRequest, com.google.longrunning.Operation> + getCloneDatabaseMethod; + if ((getCloneDatabaseMethod = FirestoreAdminGrpc.getCloneDatabaseMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getCloneDatabaseMethod = FirestoreAdminGrpc.getCloneDatabaseMethod) == null) { + FirestoreAdminGrpc.getCloneDatabaseMethod = + getCloneDatabaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CloneDatabase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.CloneDatabaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("CloneDatabase")) + .build(); + } + } + } + return getCloneDatabaseMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static FirestoreAdminStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1136,6 +1499,19 @@ public FirestoreAdminStub newStub( return FirestoreAdminStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static FirestoreAdminBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FirestoreAdminBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirestoreAdminBlockingV2Stub(channel, callOptions); + } + }; + return FirestoreAdminBlockingV2Stub.newStub(factory, channel); + } + /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ @@ -1449,124 +1825,225 @@ default void deleteDatabase( * * *
-     * Gets information about a backup.
+     * Create a user creds.
      * 
*/ - default void getBackup( - com.google.firestore.admin.v1.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); + default void createUserCreds( + com.google.firestore.admin.v1.CreateUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateUserCredsMethod(), responseObserver); } /** * * *
-     * Lists all the backups.
+     * Gets a user creds resource. Note that the returned resource does not
+     * contain the secret value itself.
      * 
*/ - default void listBackups( - com.google.firestore.admin.v1.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + default void getUserCreds( + com.google.firestore.admin.v1.GetUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListBackupsMethod(), responseObserver); + getGetUserCredsMethod(), responseObserver); } /** * * *
-     * Deletes a backup.
+     * List all user creds in the database. Note that the returned resource
+     * does not contain the secret value itself.
      * 
*/ - default void deleteBackup( - com.google.firestore.admin.v1.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { + default void listUserCreds( + com.google.firestore.admin.v1.ListUserCredsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteBackupMethod(), responseObserver); + getListUserCredsMethod(), responseObserver); } /** * * *
-     * 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.
      * 
*/ - default void restoreDatabase( - com.google.firestore.admin.v1.RestoreDatabaseRequest request, - io.grpc.stub.StreamObserver responseObserver) { + default void enableUserCreds( + com.google.firestore.admin.v1.EnableUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRestoreDatabaseMethod(), responseObserver); + getEnableUserCredsMethod(), responseObserver); } /** * * *
-     * Creates a backup schedule on a database.
-     * At most two backup schedules can be configured on a database, one daily
-     * backup schedule and one weekly backup schedule.
+     * Disables a user creds. No-op if the user creds are already disabled.
      * 
*/ - default void createBackupSchedule( - com.google.firestore.admin.v1.CreateBackupScheduleRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + default void disableUserCreds( + com.google.firestore.admin.v1.DisableUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateBackupScheduleMethod(), responseObserver); + getDisableUserCredsMethod(), responseObserver); } /** * * *
-     * Gets information about a backup schedule.
+     * Resets the password of a user creds.
      * 
*/ - default void getBackupSchedule( - com.google.firestore.admin.v1.GetBackupScheduleRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + default void resetUserPassword( + com.google.firestore.admin.v1.ResetUserPasswordRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetBackupScheduleMethod(), responseObserver); + getResetUserPasswordMethod(), responseObserver); } /** * * *
-     * List backup schedules.
+     * Deletes a user creds.
      * 
*/ - default void listBackupSchedules( - com.google.firestore.admin.v1.ListBackupSchedulesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + default void deleteUserCreds( + com.google.firestore.admin.v1.DeleteUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListBackupSchedulesMethod(), responseObserver); + getDeleteUserCredsMethod(), responseObserver); } /** * * *
-     * Updates a backup schedule.
+     * Gets information about a backup.
+     * 
+ */ + default void getBackup( + com.google.firestore.admin.v1.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all the backups.
+     * 
+ */ + default void listBackups( + com.google.firestore.admin.v1.ListBackupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a backup.
+     * 
+ */ + default void deleteBackup( + com.google.firestore.admin.v1.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + default void restoreDatabase( + com.google.firestore.admin.v1.RestoreDatabaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestoreDatabaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a backup schedule on a database.
+     * At most two backup schedules can be configured on a database, one daily
+     * backup schedule and one weekly backup schedule.
+     * 
+ */ + default void createBackupSchedule( + com.google.firestore.admin.v1.CreateBackupScheduleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBackupScheduleMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets information about a backup schedule.
+     * 
+ */ + default void getBackupSchedule( + com.google.firestore.admin.v1.GetBackupScheduleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBackupScheduleMethod(), responseObserver); + } + + /** + * + * + *
+     * List backup schedules.
+     * 
+ */ + default void listBackupSchedules( + com.google.firestore.admin.v1.ListBackupSchedulesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupSchedulesMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a backup schedule.
      * 
*/ default void updateBackupSchedule( @@ -1590,6 +2067,34 @@ default void deleteBackupSchedule( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteBackupScheduleMethod(), responseObserver); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + default void cloneDatabase( + com.google.firestore.admin.v1.CloneDatabaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCloneDatabaseMethod(), responseObserver); + } } /** @@ -1944,6 +2449,121 @@ public void deleteDatabase( responseObserver); } + /** + * + * + *
+     * Create a user creds.
+     * 
+ */ + public void createUserCreds( + com.google.firestore.admin.v1.CreateUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateUserCredsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a user creds resource. Note that the returned resource does not
+     * contain the secret value itself.
+     * 
+ */ + public void getUserCreds( + com.google.firestore.admin.v1.GetUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetUserCredsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List all user creds in the database. Note that the returned resource
+     * does not contain the secret value itself.
+     * 
+ */ + public void listUserCreds( + com.google.firestore.admin.v1.ListUserCredsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListUserCredsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Enables a user creds. No-op if the user creds are already enabled.
+     * 
+ */ + public void enableUserCreds( + com.google.firestore.admin.v1.EnableUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getEnableUserCredsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Disables a user creds. No-op if the user creds are already disabled.
+     * 
+ */ + public void disableUserCreds( + com.google.firestore.admin.v1.DisableUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDisableUserCredsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resets the password of a user creds.
+     * 
+ */ + public void resetUserPassword( + com.google.firestore.admin.v1.ResetUserPasswordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResetUserPasswordMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a user creds.
+     * 
+ */ + public void deleteUserCreds( + com.google.firestore.admin.v1.DeleteUserCredsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteUserCredsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2081,14 +2701,550 @@ public void listBackupSchedules( * Updates a backup schedule. * */ - public void updateBackupSchedule( - com.google.firestore.admin.v1.UpdateBackupScheduleRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateBackupScheduleMethod(), getCallOptions()), - request, - responseObserver); + public void updateBackupSchedule( + com.google.firestore.admin.v1.UpdateBackupScheduleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBackupScheduleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a backup schedule.
+     * 
+ */ + public void deleteBackupSchedule( + com.google.firestore.admin.v1.DeleteBackupScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupScheduleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void cloneDatabase( + com.google.firestore.admin.v1.CloneDatabaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCloneDatabaseMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service FirestoreAdmin. + * + *
+   * The Cloud Firestore Admin API.
+   * This API provides several administrative services for Cloud Firestore.
+   * Project, Database, Namespace, Collection, Collection Group, and Document are
+   * used as defined in the Google Cloud Firestore API.
+   * Operation: An Operation represents work being performed in the background.
+   * The index service manages Cloud Firestore indexes.
+   * Index creation is performed asynchronously.
+   * An Operation resource is created for each such asynchronous operation.
+   * The state of the operation (including any errors encountered)
+   * may be queried via the Operation resource.
+   * The Operations collection provides a record of actions performed for the
+   * specified Project (including any Operations in progress). Operations are not
+   * created directly but through calls on other collections or resources.
+   * An Operation that is done may be deleted so that it is no longer listed as
+   * part of the Operation collection. Operations are garbage collected after
+   * 30 days. By default, ListOperations will only return in progress and failed
+   * operations. To list completed operation, issue a ListOperations request with
+   * the filter `done: true`.
+   * Operations are created by service `FirestoreAdmin`, but are accessed via
+   * service `google.longrunning.Operations`.
+   * 
+ */ + public static final class FirestoreAdminBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private FirestoreAdminBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirestoreAdminBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirestoreAdminBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a composite index. This returns a
+     * [google.longrunning.Operation][google.longrunning.Operation] which may be
+     * used to track the status of the creation. The metadata for the operation
+     * will be the type
+     * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation createIndex( + com.google.firestore.admin.v1.CreateIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists composite indexes.
+     * 
+ */ + public com.google.firestore.admin.v1.ListIndexesResponse listIndexes( + com.google.firestore.admin.v1.ListIndexesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListIndexesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a composite index.
+     * 
+ */ + public com.google.firestore.admin.v1.Index getIndex( + com.google.firestore.admin.v1.GetIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a composite index.
+     * 
+ */ + public com.google.protobuf.Empty deleteIndex( + com.google.firestore.admin.v1.DeleteIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the metadata and configuration for a Field.
+     * 
+ */ + public com.google.firestore.admin.v1.Field getField( + com.google.firestore.admin.v1.GetFieldRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFieldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a field configuration. Currently, field updates apply only to
+     * single field index configuration. However, calls to
+     * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]
+     * should provide a field mask to avoid changing any configuration that the
+     * caller isn't aware of. The field mask should be specified as: `{ paths:
+     * "index_config" }`.
+     * This call returns a
+     * [google.longrunning.Operation][google.longrunning.Operation] which may be
+     * used to track the status of the field update. The metadata for the
+     * operation will be the type
+     * [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
+     * To configure the default field settings for the database, use
+     * the special `Field` with resource name:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
+     * 
+ */ + public com.google.longrunning.Operation updateField( + com.google.firestore.admin.v1.UpdateFieldRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFieldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the field configuration and metadata for this database.
+     * Currently,
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
+     * only supports listing fields that have been explicitly overridden. To issue
+     * this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
+     * with the filter set to `indexConfig.usesAncestorConfig:false` or
+     * `ttlConfig:*`.
+     * 
+ */ + public com.google.firestore.admin.v1.ListFieldsResponse listFields( + com.google.firestore.admin.v1.ListFieldsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFieldsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports a copy of all or a subset of documents from Google Cloud Firestore
+     * to another storage system, such as Google Cloud Storage. Recent updates to
+     * documents may not be reflected in the export. The export occurs in the
+     * background and its progress can be monitored and managed via the
+     * Operation resource that is created. The output of an export may only be
+     * used once the associated operation is done. If an export operation is
+     * cancelled before completion it may leave partial data behind in Google
+     * Cloud Storage.
+     * For more details on export behavior and output format, refer to:
+     * https://cloud.google.com/firestore/docs/manage-data/export-import
+     * 
+ */ + public com.google.longrunning.Operation exportDocuments( + com.google.firestore.admin.v1.ExportDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports documents into Google Cloud Firestore. Existing documents with the
+     * same name are overwritten. The import occurs in the background and its
+     * progress can be monitored and managed via the Operation resource that is
+     * created. If an ImportDocuments operation is cancelled, it is possible
+     * that a subset of the data has already been imported to Cloud Firestore.
+     * 
+ */ + public com.google.longrunning.Operation importDocuments( + com.google.firestore.admin.v1.ImportDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Bulk deletes a subset of documents from Google Cloud Firestore.
+     * Documents created or updated after the underlying system starts to process
+     * the request will not be deleted. The bulk delete occurs in the background
+     * and its progress can be monitored and managed via the Operation resource
+     * that is created.
+     * For more details on bulk delete behavior, refer to:
+     * https://cloud.google.com/firestore/docs/manage-data/bulk-delete
+     * 
+ */ + public com.google.longrunning.Operation bulkDeleteDocuments( + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBulkDeleteDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a database.
+     * 
+ */ + public com.google.longrunning.Operation createDatabase( + com.google.firestore.admin.v1.CreateDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDatabaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets information about a database.
+     * 
+ */ + public com.google.firestore.admin.v1.Database getDatabase( + com.google.firestore.admin.v1.GetDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDatabaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List all the databases in the project.
+     * 
+ */ + public com.google.firestore.admin.v1.ListDatabasesResponse listDatabases( + com.google.firestore.admin.v1.ListDatabasesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDatabasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a database.
+     * 
+ */ + public com.google.longrunning.Operation updateDatabase( + com.google.firestore.admin.v1.UpdateDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDatabaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a database.
+     * 
+ */ + public com.google.longrunning.Operation deleteDatabase( + com.google.firestore.admin.v1.DeleteDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDatabaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a user creds.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds createUserCreds( + com.google.firestore.admin.v1.CreateUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a user creds resource. Note that the returned resource does not
+     * contain the secret value itself.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds getUserCreds( + com.google.firestore.admin.v1.GetUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List all user creds in the database. Note that the returned resource
+     * does not contain the secret value itself.
+     * 
+ */ + public com.google.firestore.admin.v1.ListUserCredsResponse listUserCreds( + com.google.firestore.admin.v1.ListUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Enables a user creds. No-op if the user creds are already enabled.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds enableUserCreds( + com.google.firestore.admin.v1.EnableUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEnableUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Disables a user creds. No-op if the user creds are already disabled.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds disableUserCreds( + com.google.firestore.admin.v1.DisableUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDisableUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resets the password of a user creds.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds resetUserPassword( + com.google.firestore.admin.v1.ResetUserPasswordRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResetUserPasswordMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a user creds.
+     * 
+ */ + public com.google.protobuf.Empty deleteUserCreds( + com.google.firestore.admin.v1.DeleteUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets information about a backup.
+     * 
+ */ + public com.google.firestore.admin.v1.Backup getBackup( + com.google.firestore.admin.v1.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all the backups.
+     * 
+ */ + public com.google.firestore.admin.v1.ListBackupsResponse listBackups( + com.google.firestore.admin.v1.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a backup.
+     * 
+ */ + public com.google.protobuf.Empty deleteBackup( + com.google.firestore.admin.v1.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.longrunning.Operation restoreDatabase( + com.google.firestore.admin.v1.RestoreDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreDatabaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a backup schedule on a database.
+     * At most two backup schedules can be configured on a database, one daily
+     * backup schedule and one weekly backup schedule.
+     * 
+ */ + public com.google.firestore.admin.v1.BackupSchedule createBackupSchedule( + com.google.firestore.admin.v1.CreateBackupScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupScheduleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets information about a backup schedule.
+     * 
+ */ + public com.google.firestore.admin.v1.BackupSchedule getBackupSchedule( + com.google.firestore.admin.v1.GetBackupScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupScheduleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List backup schedules.
+     * 
+ */ + public com.google.firestore.admin.v1.ListBackupSchedulesResponse listBackupSchedules( + com.google.firestore.admin.v1.ListBackupSchedulesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupSchedulesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a backup schedule.
+     * 
+ */ + public com.google.firestore.admin.v1.BackupSchedule updateBackupSchedule( + com.google.firestore.admin.v1.UpdateBackupScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBackupScheduleMethod(), getCallOptions(), request); } /** @@ -2098,18 +3254,42 @@ public void updateBackupSchedule( * Deletes a backup schedule. * */ - public void deleteBackupSchedule( - com.google.firestore.admin.v1.DeleteBackupScheduleRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBackupScheduleMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteBackupSchedule( + com.google.firestore.admin.v1.DeleteBackupScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupScheduleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.longrunning.Operation cloneDatabase( + com.google.firestore.admin.v1.CloneDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCloneDatabaseMethod(), getCallOptions(), request); } } /** - * A stub to allow clients to do synchronous rpc calls to service FirestoreAdmin. + * A stub to allow clients to do limited synchronous rpc calls to service FirestoreAdmin. * *
    * The Cloud Firestore Admin API.
@@ -2384,6 +3564,99 @@ public com.google.longrunning.Operation deleteDatabase(
           getChannel(), getDeleteDatabaseMethod(), getCallOptions(), request);
     }
 
+    /**
+     *
+     *
+     * 
+     * Create a user creds.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds createUserCreds( + com.google.firestore.admin.v1.CreateUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a user creds resource. Note that the returned resource does not
+     * contain the secret value itself.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds getUserCreds( + com.google.firestore.admin.v1.GetUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List all user creds in the database. Note that the returned resource
+     * does not contain the secret value itself.
+     * 
+ */ + public com.google.firestore.admin.v1.ListUserCredsResponse listUserCreds( + com.google.firestore.admin.v1.ListUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Enables a user creds. No-op if the user creds are already enabled.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds enableUserCreds( + com.google.firestore.admin.v1.EnableUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEnableUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Disables a user creds. No-op if the user creds are already disabled.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds disableUserCreds( + com.google.firestore.admin.v1.DisableUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDisableUserCredsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resets the password of a user creds.
+     * 
+ */ + public com.google.firestore.admin.v1.UserCreds resetUserPassword( + com.google.firestore.admin.v1.ResetUserPasswordRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResetUserPasswordMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a user creds.
+     * 
+ */ + public com.google.protobuf.Empty deleteUserCreds( + com.google.firestore.admin.v1.DeleteUserCredsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteUserCredsMethod(), getCallOptions(), request); + } + /** * * @@ -2516,6 +3789,33 @@ public com.google.protobuf.Empty deleteBackupSchedule( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteBackupScheduleMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.longrunning.Operation cloneDatabase( + com.google.firestore.admin.v1.CloneDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCloneDatabaseMethod(), getCallOptions(), request); + } } /** @@ -2798,6 +4098,105 @@ protected FirestoreAdminFutureStub build( getChannel().newCall(getDeleteDatabaseMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Create a user creds.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.UserCreds> + createUserCreds(com.google.firestore.admin.v1.CreateUserCredsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateUserCredsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a user creds resource. Note that the returned resource does not
+     * contain the secret value itself.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.UserCreds> + getUserCreds(com.google.firestore.admin.v1.GetUserCredsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetUserCredsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List all user creds in the database. Note that the returned resource
+     * does not contain the secret value itself.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.ListUserCredsResponse> + listUserCreds(com.google.firestore.admin.v1.ListUserCredsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListUserCredsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Enables a user creds. No-op if the user creds are already enabled.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.UserCreds> + enableUserCreds(com.google.firestore.admin.v1.EnableUserCredsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getEnableUserCredsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Disables a user creds. No-op if the user creds are already disabled.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.UserCreds> + disableUserCreds(com.google.firestore.admin.v1.DisableUserCredsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDisableUserCredsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resets the password of a user creds.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.UserCreds> + resetUserPassword(com.google.firestore.admin.v1.ResetUserPasswordRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResetUserPasswordMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a user creds.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteUserCreds(com.google.firestore.admin.v1.DeleteUserCredsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteUserCredsMethod(), getCallOptions()), request); + } + /** * * @@ -2935,6 +4334,33 @@ protected FirestoreAdminFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteBackupScheduleMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cloneDatabase(com.google.firestore.admin.v1.CloneDatabaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCloneDatabaseMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_INDEX = 0; @@ -2952,15 +4378,23 @@ protected FirestoreAdminFutureStub build( private static final int METHODID_LIST_DATABASES = 12; private static final int METHODID_UPDATE_DATABASE = 13; private static final int METHODID_DELETE_DATABASE = 14; - private static final int METHODID_GET_BACKUP = 15; - private static final int METHODID_LIST_BACKUPS = 16; - private static final int METHODID_DELETE_BACKUP = 17; - private static final int METHODID_RESTORE_DATABASE = 18; - private static final int METHODID_CREATE_BACKUP_SCHEDULE = 19; - private static final int METHODID_GET_BACKUP_SCHEDULE = 20; - private static final int METHODID_LIST_BACKUP_SCHEDULES = 21; - private static final int METHODID_UPDATE_BACKUP_SCHEDULE = 22; - private static final int METHODID_DELETE_BACKUP_SCHEDULE = 23; + private static final int METHODID_CREATE_USER_CREDS = 15; + private static final int METHODID_GET_USER_CREDS = 16; + private static final int METHODID_LIST_USER_CREDS = 17; + private static final int METHODID_ENABLE_USER_CREDS = 18; + private static final int METHODID_DISABLE_USER_CREDS = 19; + private static final int METHODID_RESET_USER_PASSWORD = 20; + private static final int METHODID_DELETE_USER_CREDS = 21; + private static final int METHODID_GET_BACKUP = 22; + private static final int METHODID_LIST_BACKUPS = 23; + private static final int METHODID_DELETE_BACKUP = 24; + private static final int METHODID_RESTORE_DATABASE = 25; + private static final int METHODID_CREATE_BACKUP_SCHEDULE = 26; + private static final int METHODID_GET_BACKUP_SCHEDULE = 27; + private static final int METHODID_LIST_BACKUP_SCHEDULES = 28; + private static final int METHODID_UPDATE_BACKUP_SCHEDULE = 29; + private static final int METHODID_DELETE_BACKUP_SCHEDULE = 30; + private static final int METHODID_CLONE_DATABASE = 31; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3058,6 +4492,47 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.firestore.admin.v1.DeleteDatabaseRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_USER_CREDS: + serviceImpl.createUserCreds( + (com.google.firestore.admin.v1.CreateUserCredsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_USER_CREDS: + serviceImpl.getUserCreds( + (com.google.firestore.admin.v1.GetUserCredsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_USER_CREDS: + serviceImpl.listUserCreds( + (com.google.firestore.admin.v1.ListUserCredsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_ENABLE_USER_CREDS: + serviceImpl.enableUserCreds( + (com.google.firestore.admin.v1.EnableUserCredsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DISABLE_USER_CREDS: + serviceImpl.disableUserCreds( + (com.google.firestore.admin.v1.DisableUserCredsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RESET_USER_PASSWORD: + serviceImpl.resetUserPassword( + (com.google.firestore.admin.v1.ResetUserPasswordRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_USER_CREDS: + serviceImpl.deleteUserCreds( + (com.google.firestore.admin.v1.DeleteUserCredsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_BACKUP: serviceImpl.getBackup( (com.google.firestore.admin.v1.GetBackupRequest) request, @@ -3109,6 +4584,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.firestore.admin.v1.DeleteBackupScheduleRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CLONE_DATABASE: + serviceImpl.cloneDatabase( + (com.google.firestore.admin.v1.CloneDatabaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -3220,6 +4700,50 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.firestore.admin.v1.DeleteDatabaseRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_DATABASE))) + .addMethod( + getCreateUserCredsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.CreateUserCredsRequest, + com.google.firestore.admin.v1.UserCreds>(service, METHODID_CREATE_USER_CREDS))) + .addMethod( + getGetUserCredsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.GetUserCredsRequest, + com.google.firestore.admin.v1.UserCreds>(service, METHODID_GET_USER_CREDS))) + .addMethod( + getListUserCredsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.ListUserCredsRequest, + com.google.firestore.admin.v1.ListUserCredsResponse>( + service, METHODID_LIST_USER_CREDS))) + .addMethod( + getEnableUserCredsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.EnableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds>(service, METHODID_ENABLE_USER_CREDS))) + .addMethod( + getDisableUserCredsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.DisableUserCredsRequest, + com.google.firestore.admin.v1.UserCreds>(service, METHODID_DISABLE_USER_CREDS))) + .addMethod( + getResetUserPasswordMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.ResetUserPasswordRequest, + com.google.firestore.admin.v1.UserCreds>( + service, METHODID_RESET_USER_PASSWORD))) + .addMethod( + getDeleteUserCredsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.DeleteUserCredsRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_USER_CREDS))) .addMethod( getGetBackupMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -3279,6 +4803,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.firestore.admin.v1.DeleteBackupScheduleRequest, com.google.protobuf.Empty>(service, METHODID_DELETE_BACKUP_SCHEDULE))) + .addMethod( + getCloneDatabaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.CloneDatabaseRequest, + com.google.longrunning.Operation>(service, METHODID_CLONE_DATABASE))) .build(); } @@ -3345,6 +4875,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListDatabasesMethod()) .addMethod(getUpdateDatabaseMethod()) .addMethod(getDeleteDatabaseMethod()) + .addMethod(getCreateUserCredsMethod()) + .addMethod(getGetUserCredsMethod()) + .addMethod(getListUserCredsMethod()) + .addMethod(getEnableUserCredsMethod()) + .addMethod(getDisableUserCredsMethod()) + .addMethod(getResetUserPasswordMethod()) + .addMethod(getDeleteUserCredsMethod()) .addMethod(getGetBackupMethod()) .addMethod(getListBackupsMethod()) .addMethod(getDeleteBackupMethod()) @@ -3354,6 +4891,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListBackupSchedulesMethod()) .addMethod(getUpdateBackupScheduleMethod()) .addMethod(getDeleteBackupScheduleMethod()) + .addMethod(getCloneDatabaseMethod()) .build(); } } diff --git a/grpc-google-cloud-firestore-v1/clirr-ignored-differences.xml b/grpc-google-cloud-firestore-v1/clirr-ignored-differences.xml index fc73daacd..3cced6b5b 100644 --- a/grpc-google-cloud-firestore-v1/clirr-ignored-differences.xml +++ b/grpc-google-cloud-firestore-v1/clirr-ignored-differences.xml @@ -1,4 +1,9 @@ + + 7012 + com/google/firestore/v1/FirestoreGrpc$AsyncService + void executePipeline(com.google.firestore.v1.ExecutePipelineRequest, io.grpc.stub.StreamObserver) + diff --git a/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java b/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java index 24bd52f05..069025bc5 100644 --- a/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java +++ b/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.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. @@ -421,6 +421,50 @@ private FirestoreGrpc() {} return getRunQueryMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.v1.ExecutePipelineRequest, + com.google.firestore.v1.ExecutePipelineResponse> + getExecutePipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecutePipeline", + requestType = com.google.firestore.v1.ExecutePipelineRequest.class, + responseType = com.google.firestore.v1.ExecutePipelineResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.firestore.v1.ExecutePipelineRequest, + com.google.firestore.v1.ExecutePipelineResponse> + getExecutePipelineMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.v1.ExecutePipelineRequest, + com.google.firestore.v1.ExecutePipelineResponse> + getExecutePipelineMethod; + if ((getExecutePipelineMethod = FirestoreGrpc.getExecutePipelineMethod) == null) { + synchronized (FirestoreGrpc.class) { + if ((getExecutePipelineMethod = FirestoreGrpc.getExecutePipelineMethod) == null) { + FirestoreGrpc.getExecutePipelineMethod = + getExecutePipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecutePipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.v1.ExecutePipelineRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.v1.ExecutePipelineResponse.getDefaultInstance())) + .setSchemaDescriptor(new FirestoreMethodDescriptorSupplier("ExecutePipeline")) + .build(); + } + } + } + return getExecutePipelineMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.firestore.v1.RunAggregationQueryRequest, com.google.firestore.v1.RunAggregationQueryResponse> @@ -735,6 +779,19 @@ public FirestoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOp return FirestoreStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static FirestoreBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FirestoreBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirestoreBlockingV2Stub(channel, callOptions); + } + }; + return FirestoreBlockingV2Stub.newStub(factory, channel); + } + /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ @@ -906,6 +963,21 @@ default void runQuery( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunQueryMethod(), responseObserver); } + /** + * + * + *
+     * Executes a pipeline query.
+     * 
+ */ + default void executePipeline( + com.google.firestore.v1.ExecutePipelineRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExecutePipelineMethod(), responseObserver); + } + /** * * @@ -1212,6 +1284,23 @@ public void runQuery( getChannel().newCall(getRunQueryMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
+     * Executes a pipeline query.
+     * 
+ */ + public void executePipeline( + com.google.firestore.v1.ExecutePipelineRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getExecutePipelineMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1353,6 +1442,282 @@ public void createDocument( * truly serverless apps. *
*/ + public static final class FirestoreBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private FirestoreBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirestoreBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirestoreBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a single document.
+     * 
+ */ + public com.google.firestore.v1.Document getDocument( + com.google.firestore.v1.GetDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists documents.
+     * 
+ */ + public com.google.firestore.v1.ListDocumentsResponse listDocuments( + com.google.firestore.v1.ListDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates or inserts a document.
+     * 
+ */ + public com.google.firestore.v1.Document updateDocument( + com.google.firestore.v1.UpdateDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a document.
+     * 
+ */ + public com.google.protobuf.Empty deleteDocument( + com.google.firestore.v1.DeleteDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets multiple documents.
+     * Documents returned by this method are not guaranteed to be returned in the
+     * same order that they were requested.
+     * 
+ */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall + batchGetDocuments(com.google.firestore.v1.BatchGetDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getBatchGetDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a new transaction.
+     * 
+ */ + public com.google.firestore.v1.BeginTransactionResponse beginTransaction( + com.google.firestore.v1.BeginTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBeginTransactionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Commits a transaction, while optionally updating documents.
+     * 
+ */ + public com.google.firestore.v1.CommitResponse commit( + com.google.firestore.v1.CommitRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCommitMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rolls back a transaction.
+     * 
+ */ + public com.google.protobuf.Empty rollback(com.google.firestore.v1.RollbackRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRollbackMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Runs a query.
+     * 
+ */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall runQuery( + com.google.firestore.v1.RunQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getRunQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Executes a pipeline query.
+     * 
+ */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall + executePipeline(com.google.firestore.v1.ExecutePipelineRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getExecutePipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Runs an aggregation query.
+     * Rather than producing [Document][google.firestore.v1.Document] results like
+     * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API
+     * allows running an aggregation to produce a series of
+     * [AggregationResult][google.firestore.v1.AggregationResult] server-side.
+     * High-Level Example:
+     * ```
+     * -- Return the number of documents in table given a filter.
+     * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true );
+     * ```
+     * 
+ */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall + runAggregationQuery(com.google.firestore.v1.RunAggregationQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getRunAggregationQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Partitions a query by returning partition cursors that can be used to run
+     * the query in parallel. The returned partition cursors are split points that
+     * can be used by RunQuery as starting/end points for the query results.
+     * 
+ */ + public com.google.firestore.v1.PartitionQueryResponse partitionQuery( + com.google.firestore.v1.PartitionQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPartitionQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Streams batches of document updates and deletes, in order. This method is
+     * only available via gRPC or WebChannel (not REST).
+     * 
+ */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + com.google.firestore.v1.WriteRequest, com.google.firestore.v1.WriteResponse> + write() { + return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( + getChannel(), getWriteMethod(), getCallOptions()); + } + + /** + * + * + *
+     * Listens to changes. This method is only available via gRPC or WebChannel
+     * (not REST).
+     * 
+ */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + com.google.firestore.v1.ListenRequest, com.google.firestore.v1.ListenResponse> + listen() { + return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( + getChannel(), getListenMethod(), getCallOptions()); + } + + /** + * + * + *
+     * Lists all the collection IDs underneath a document.
+     * 
+ */ + public com.google.firestore.v1.ListCollectionIdsResponse listCollectionIds( + com.google.firestore.v1.ListCollectionIdsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCollectionIdsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Applies a batch of write operations.
+     * The BatchWrite method does not apply the write operations atomically
+     * and can apply them out of order. Method does not allow more than one write
+     * per document. Each write succeeds or fails independently. See the
+     * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the
+     * success status of each write.
+     * If you require an atomically applied set of writes, use
+     * [Commit][google.firestore.v1.Firestore.Commit] instead.
+     * 
+ */ + public com.google.firestore.v1.BatchWriteResponse batchWrite( + com.google.firestore.v1.BatchWriteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchWriteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new document.
+     * 
+ */ + public com.google.firestore.v1.Document createDocument( + com.google.firestore.v1.CreateDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDocumentMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Firestore. + * + *
+   * The Cloud Firestore service.
+   * Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
+   * document database that simplifies storing, syncing, and querying data for
+   * your mobile, web, and IoT apps at global scale. Its client libraries provide
+   * live synchronization and offline support, while its security features and
+   * integrations with Firebase and Google Cloud Platform accelerate building
+   * truly serverless apps.
+   * 
+ */ public static final class FirestoreBlockingStub extends io.grpc.stub.AbstractBlockingStub { private FirestoreBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { @@ -1483,6 +1848,19 @@ public java.util.Iterator runQuery( getChannel(), getRunQueryMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Executes a pipeline query.
+     * 
+ */ + public java.util.Iterator executePipeline( + com.google.firestore.v1.ExecutePipelineRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getExecutePipelineMethod(), getCallOptions(), request); + } + /** * * @@ -1759,13 +2137,14 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1834,6 +2213,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_EXECUTE_PIPELINE: + serviceImpl.executePipeline( + (com.google.firestore.v1.ExecutePipelineRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_RUN_AGGREGATION_QUERY: serviceImpl.runAggregationQuery( (com.google.firestore.v1.RunAggregationQueryRequest) request, @@ -1948,6 +2333,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.firestore.v1.RunQueryRequest, com.google.firestore.v1.RunQueryResponse>(service, METHODID_RUN_QUERY))) + .addMethod( + getExecutePipelineMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.firestore.v1.ExecutePipelineRequest, + com.google.firestore.v1.ExecutePipelineResponse>( + service, METHODID_EXECUTE_PIPELINE))) .addMethod( getRunAggregationQueryMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( @@ -2053,6 +2445,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCommitMethod()) .addMethod(getRollbackMethod()) .addMethod(getRunQueryMethod()) + .addMethod(getExecutePipelineMethod()) .addMethod(getRunAggregationQueryMethod()) .addMethod(getPartitionQueryMethod()) .addMethod(getWriteMethod()) diff --git a/pom.xml b/pom.xml index fd97a6a13..6c950cbb3 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.34.0 + 3.51.0 diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Backup.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Backup.java index aa61d5aa3..375ac7eab 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Backup.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Backup.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/backup.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -36,6 +36,7 @@ public final class Backup extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Backup) BackupOrBuilder { private static final long serialVersionUID = 0L; + // Use Backup.newBuilder() to construct. private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -133,6 +134,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -144,6 +146,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CREATING = 1; */ public static final int CREATING_VALUE = 1; + /** * * @@ -154,6 +157,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 2; */ public static final int READY_VALUE = 2; + /** * * @@ -295,6 +299,7 @@ public interface StatsOrBuilder */ long getIndexCount(); } + /** * * @@ -309,6 +314,7 @@ public static final class Stats extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Backup.Stats) StatsOrBuilder { private static final long serialVersionUID = 0L; + // Use Stats.newBuilder() to construct. private Stats(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -339,6 +345,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int SIZE_BYTES_FIELD_NUMBER = 1; private long sizeBytes_ = 0L; + /** * * @@ -358,6 +365,7 @@ public long getSizeBytes() { public static final int DOCUMENT_COUNT_FIELD_NUMBER = 2; private long documentCount_ = 0L; + /** * * @@ -376,6 +384,7 @@ public long getDocumentCount() { public static final int INDEX_COUNT_FIELD_NUMBER = 3; private long indexCount_ = 0L; + /** * * @@ -570,6 +579,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -780,6 +790,7 @@ public Builder mergeFrom( private int bitField0_; private long sizeBytes_; + /** * * @@ -796,6 +807,7 @@ public Builder mergeFrom( public long getSizeBytes() { return sizeBytes_; } + /** * * @@ -816,6 +828,7 @@ public Builder setSizeBytes(long value) { onChanged(); return this; } + /** * * @@ -836,6 +849,7 @@ public Builder clearSizeBytes() { } private long documentCount_; + /** * * @@ -851,6 +865,7 @@ public Builder clearSizeBytes() { public long getDocumentCount() { return documentCount_; } + /** * * @@ -870,6 +885,7 @@ public Builder setDocumentCount(long value) { onChanged(); return this; } + /** * * @@ -889,6 +905,7 @@ public Builder clearDocumentCount() { } private long indexCount_; + /** * * @@ -904,6 +921,7 @@ public Builder clearDocumentCount() { public long getIndexCount() { return indexCount_; } + /** * * @@ -923,6 +941,7 @@ public Builder setIndexCount(long value) { onChanged(); return this; } + /** * * @@ -1010,6 +1029,7 @@ public com.google.firestore.admin.v1.Backup.Stats getDefaultInstanceForType() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -1035,6 +1055,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -1065,6 +1086,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -1092,6 +1114,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -1124,6 +1147,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { @SuppressWarnings("serial") private volatile java.lang.Object databaseUid_ = ""; + /** * * @@ -1148,6 +1172,7 @@ public java.lang.String getDatabaseUid() { return s; } } + /** * * @@ -1175,6 +1200,7 @@ public com.google.protobuf.ByteString getDatabaseUidBytes() { public static final int SNAPSHOT_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp snapshotTime_; + /** * * @@ -1193,6 +1219,7 @@ public com.google.protobuf.ByteString getDatabaseUidBytes() { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1213,6 +1240,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { ? com.google.protobuf.Timestamp.getDefaultInstance() : snapshotTime_; } + /** * * @@ -1234,6 +1262,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { public static final int EXPIRE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp expireTime_; + /** * * @@ -1250,6 +1279,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { public boolean hasExpireTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1266,6 +1296,7 @@ public boolean hasExpireTime() { public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } + /** * * @@ -1283,6 +1314,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public static final int STATS_FIELD_NUMBER = 6; private com.google.firestore.admin.v1.Backup.Stats stats_; + /** * * @@ -1303,6 +1335,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public boolean hasStats() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1325,6 +1358,7 @@ public com.google.firestore.admin.v1.Backup.Stats getStats() { ? com.google.firestore.admin.v1.Backup.Stats.getDefaultInstance() : stats_; } + /** * * @@ -1348,6 +1382,7 @@ public com.google.firestore.admin.v1.Backup.StatsOrBuilder getStatsOrBuilder() { public static final int STATE_FIELD_NUMBER = 8; private int state_ = 0; + /** * * @@ -1365,6 +1400,7 @@ public com.google.firestore.admin.v1.Backup.StatsOrBuilder getStatsOrBuilder() { public int getStateValue() { return state_; } + /** * * @@ -1611,6 +1647,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1907,6 +1944,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1931,6 +1969,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1955,6 +1994,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1978,6 +2018,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1997,6 +2038,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -2023,6 +2065,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object database_ = ""; + /** * * @@ -2049,6 +2092,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -2075,6 +2119,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2100,6 +2145,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2121,6 +2167,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -2149,6 +2196,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private java.lang.Object databaseUid_ = ""; + /** * * @@ -2172,6 +2220,7 @@ public java.lang.String getDatabaseUid() { return (java.lang.String) ref; } } + /** * * @@ -2195,6 +2244,7 @@ public com.google.protobuf.ByteString getDatabaseUidBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2217,6 +2267,7 @@ public Builder setDatabaseUid(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2235,6 +2286,7 @@ public Builder clearDatabaseUid() { onChanged(); return this; } + /** * * @@ -2265,6 +2317,7 @@ public Builder setDatabaseUidBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> snapshotTimeBuilder_; + /** * * @@ -2282,6 +2335,7 @@ public Builder setDatabaseUidBytes(com.google.protobuf.ByteString value) { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -2305,6 +2359,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { return snapshotTimeBuilder_.getMessage(); } } + /** * * @@ -2330,6 +2385,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2352,6 +2408,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp.Builder builderForV onChanged(); return this; } + /** * * @@ -2382,6 +2439,7 @@ public Builder mergeSnapshotTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2404,6 +2462,7 @@ public Builder clearSnapshotTime() { onChanged(); return this; } + /** * * @@ -2421,6 +2480,7 @@ public com.google.protobuf.Timestamp.Builder getSnapshotTimeBuilder() { onChanged(); return getSnapshotTimeFieldBuilder().getBuilder(); } + /** * * @@ -2442,6 +2502,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { : snapshotTime_; } } + /** * * @@ -2477,6 +2538,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expireTimeBuilder_; + /** * * @@ -2493,6 +2555,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { public boolean hasExpireTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -2515,6 +2578,7 @@ public com.google.protobuf.Timestamp getExpireTime() { return expireTimeBuilder_.getMessage(); } } + /** * * @@ -2539,6 +2603,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2560,6 +2625,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -2589,6 +2655,7 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2610,6 +2677,7 @@ public Builder clearExpireTime() { onChanged(); return this; } + /** * * @@ -2626,6 +2694,7 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { onChanged(); return getExpireTimeFieldBuilder().getBuilder(); } + /** * * @@ -2646,6 +2715,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { : expireTime_; } } + /** * * @@ -2680,6 +2750,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { com.google.firestore.admin.v1.Backup.Stats.Builder, com.google.firestore.admin.v1.Backup.StatsOrBuilder> statsBuilder_; + /** * * @@ -2699,6 +2770,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public boolean hasStats() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2724,6 +2796,7 @@ public com.google.firestore.admin.v1.Backup.Stats getStats() { return statsBuilder_.getMessage(); } } + /** * * @@ -2751,6 +2824,7 @@ public Builder setStats(com.google.firestore.admin.v1.Backup.Stats value) { onChanged(); return this; } + /** * * @@ -2775,6 +2849,7 @@ public Builder setStats(com.google.firestore.admin.v1.Backup.Stats.Builder build onChanged(); return this; } + /** * * @@ -2807,6 +2882,7 @@ public Builder mergeStats(com.google.firestore.admin.v1.Backup.Stats value) { } return this; } + /** * * @@ -2831,6 +2907,7 @@ public Builder clearStats() { onChanged(); return this; } + /** * * @@ -2850,6 +2927,7 @@ public com.google.firestore.admin.v1.Backup.Stats.Builder getStatsBuilder() { onChanged(); return getStatsFieldBuilder().getBuilder(); } + /** * * @@ -2873,6 +2951,7 @@ public com.google.firestore.admin.v1.Backup.StatsOrBuilder getStatsOrBuilder() { : stats_; } } + /** * * @@ -2905,6 +2984,7 @@ public com.google.firestore.admin.v1.Backup.StatsOrBuilder getStatsOrBuilder() { } private int state_ = 0; + /** * * @@ -2922,6 +3002,7 @@ public com.google.firestore.admin.v1.Backup.StatsOrBuilder getStatsOrBuilder() { public int getStateValue() { return state_; } + /** * * @@ -2942,6 +3023,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -2961,6 +3043,7 @@ public com.google.firestore.admin.v1.Backup.State getState() { com.google.firestore.admin.v1.Backup.State.forNumber(state_); return result == null ? com.google.firestore.admin.v1.Backup.State.UNRECOGNIZED : result; } + /** * * @@ -2984,6 +3067,7 @@ public Builder setState(com.google.firestore.admin.v1.Backup.State value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupName.java index 76cdb3473..a3d972bde 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupOrBuilder.java index dd9af1b2c..b3744f4cf 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/backup.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface BackupOrBuilder @@ -38,6 +38,7 @@ public interface BackupOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +70,7 @@ public interface BackupOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -99,6 +101,7 @@ public interface BackupOrBuilder * @return The databaseUid. */ java.lang.String getDatabaseUid(); + /** * * @@ -128,6 +131,7 @@ public interface BackupOrBuilder * @return Whether the snapshotTime field is set. */ boolean hasSnapshotTime(); + /** * * @@ -143,6 +147,7 @@ public interface BackupOrBuilder * @return The snapshotTime. */ com.google.protobuf.Timestamp getSnapshotTime(); + /** * * @@ -170,6 +175,7 @@ public interface BackupOrBuilder * @return Whether the expireTime field is set. */ boolean hasExpireTime(); + /** * * @@ -183,6 +189,7 @@ public interface BackupOrBuilder * @return The expireTime. */ com.google.protobuf.Timestamp getExpireTime(); + /** * * @@ -212,6 +219,7 @@ public interface BackupOrBuilder * @return Whether the stats field is set. */ boolean hasStats(); + /** * * @@ -229,6 +237,7 @@ public interface BackupOrBuilder * @return The stats. */ com.google.firestore.admin.v1.Backup.Stats getStats(); + /** * * @@ -259,6 +268,7 @@ public interface BackupOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupProto.java index 6f0a802ae..7b6cbb819 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/backup.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class BackupProto { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupSchedule.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupSchedule.java index cb1074ec2..aeb82f635 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupSchedule.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupSchedule.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/schedule.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -36,6 +36,7 @@ public final class BackupSchedule extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.BackupSchedule) BackupScheduleOrBuilder { private static final long serialVersionUID = 0L; + // Use BackupSchedule.newBuilder() to construct. private BackupSchedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -84,6 +85,7 @@ public enum RecurrenceCase private RecurrenceCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -120,6 +122,7 @@ public RecurrenceCase getRecurrenceCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -149,6 +152,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -181,6 +185,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int CREATE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp createTime_; + /** * * @@ -200,6 +205,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasCreateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -219,6 +225,7 @@ public boolean hasCreateTime() { public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + /** * * @@ -239,6 +246,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int UPDATE_TIME_FIELD_NUMBER = 10; private com.google.protobuf.Timestamp updateTime_; + /** * * @@ -257,6 +265,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasUpdateTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -275,6 +284,7 @@ public boolean hasUpdateTime() { public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } + /** * * @@ -294,12 +304,15 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { public static final int RETENTION_FIELD_NUMBER = 6; private com.google.protobuf.Duration retention_; + /** * * *
    * At what relative time in the future, compared to its creation time,
    * the backup should be deleted, e.g. keep backups for 7 days.
+   *
+   * The maximum supported retention period is 14 weeks.
    * 
* * .google.protobuf.Duration retention = 6; @@ -310,12 +323,15 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { public boolean hasRetention() { return ((bitField0_ & 0x00000004) != 0); } + /** * * *
    * At what relative time in the future, compared to its creation time,
    * the backup should be deleted, e.g. keep backups for 7 days.
+   *
+   * The maximum supported retention period is 14 weeks.
    * 
* * .google.protobuf.Duration retention = 6; @@ -326,12 +342,15 @@ public boolean hasRetention() { public com.google.protobuf.Duration getRetention() { return retention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retention_; } + /** * * *
    * At what relative time in the future, compared to its creation time,
    * the backup should be deleted, e.g. keep backups for 7 days.
+   *
+   * The maximum supported retention period is 14 weeks.
    * 
* * .google.protobuf.Duration retention = 6; @@ -342,6 +361,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionOrBuilder() { } public static final int DAILY_RECURRENCE_FIELD_NUMBER = 7; + /** * * @@ -357,6 +377,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionOrBuilder() { public boolean hasDailyRecurrence() { return recurrenceCase_ == 7; } + /** * * @@ -375,6 +396,7 @@ public com.google.firestore.admin.v1.DailyRecurrence getDailyRecurrence() { } return com.google.firestore.admin.v1.DailyRecurrence.getDefaultInstance(); } + /** * * @@ -393,6 +415,7 @@ public com.google.firestore.admin.v1.DailyRecurrenceOrBuilder getDailyRecurrence } public static final int WEEKLY_RECURRENCE_FIELD_NUMBER = 8; + /** * * @@ -408,6 +431,7 @@ public com.google.firestore.admin.v1.DailyRecurrenceOrBuilder getDailyRecurrence public boolean hasWeeklyRecurrence() { return recurrenceCase_ == 8; } + /** * * @@ -426,6 +450,7 @@ public com.google.firestore.admin.v1.WeeklyRecurrence getWeeklyRecurrence() { } return com.google.firestore.admin.v1.WeeklyRecurrence.getDefaultInstance(); } + /** * * @@ -683,6 +708,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -999,6 +1025,7 @@ public Builder clearRecurrence() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1027,6 +1054,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1055,6 +1083,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1082,6 +1111,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1105,6 +1135,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1140,6 +1171,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** * * @@ -1159,6 +1191,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasCreateTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1184,6 +1217,7 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTimeBuilder_.getMessage(); } } + /** * * @@ -1211,6 +1245,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1235,6 +1270,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1267,6 +1303,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1291,6 +1328,7 @@ public Builder clearCreateTime() { onChanged(); return this; } + /** * * @@ -1310,6 +1348,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } + /** * * @@ -1333,6 +1372,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { : createTime_; } } + /** * * @@ -1370,6 +1410,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** * * @@ -1388,6 +1429,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasUpdateTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1412,6 +1454,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { return updateTimeBuilder_.getMessage(); } } + /** * * @@ -1438,6 +1481,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1461,6 +1505,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1492,6 +1537,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1515,6 +1561,7 @@ public Builder clearUpdateTime() { onChanged(); return this; } + /** * * @@ -1533,6 +1580,7 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } + /** * * @@ -1555,6 +1603,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { : updateTime_; } } + /** * * @@ -1591,12 +1640,15 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retentionBuilder_; + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1606,12 +1658,15 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { public boolean hasRetention() { return ((bitField0_ & 0x00000008) != 0); } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1625,12 +1680,15 @@ public com.google.protobuf.Duration getRetention() { return retentionBuilder_.getMessage(); } } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1648,12 +1706,15 @@ public Builder setRetention(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1668,12 +1729,15 @@ public Builder setRetention(com.google.protobuf.Duration.Builder builderForValue onChanged(); return this; } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1696,12 +1760,15 @@ public Builder mergeRetention(com.google.protobuf.Duration value) { } return this; } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1716,12 +1783,15 @@ public Builder clearRetention() { onChanged(); return this; } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1731,12 +1801,15 @@ public com.google.protobuf.Duration.Builder getRetentionBuilder() { onChanged(); return getRetentionFieldBuilder().getBuilder(); } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1748,12 +1821,15 @@ public com.google.protobuf.DurationOrBuilder getRetentionOrBuilder() { return retention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retention_; } } + /** * * *
      * At what relative time in the future, compared to its creation time,
      * the backup should be deleted, e.g. keep backups for 7 days.
+     *
+     * The maximum supported retention period is 14 weeks.
      * 
* * .google.protobuf.Duration retention = 6; @@ -1780,6 +1856,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionOrBuilder() { com.google.firestore.admin.v1.DailyRecurrence.Builder, com.google.firestore.admin.v1.DailyRecurrenceOrBuilder> dailyRecurrenceBuilder_; + /** * * @@ -1795,6 +1872,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionOrBuilder() { public boolean hasDailyRecurrence() { return recurrenceCase_ == 7; } + /** * * @@ -1820,6 +1898,7 @@ public com.google.firestore.admin.v1.DailyRecurrence getDailyRecurrence() { return com.google.firestore.admin.v1.DailyRecurrence.getDefaultInstance(); } } + /** * * @@ -1842,6 +1921,7 @@ public Builder setDailyRecurrence(com.google.firestore.admin.v1.DailyRecurrence recurrenceCase_ = 7; return this; } + /** * * @@ -1862,6 +1942,7 @@ public Builder setDailyRecurrence( recurrenceCase_ = 7; return this; } + /** * * @@ -1894,6 +1975,7 @@ public Builder mergeDailyRecurrence(com.google.firestore.admin.v1.DailyRecurrenc recurrenceCase_ = 7; return this; } + /** * * @@ -1919,6 +2001,7 @@ public Builder clearDailyRecurrence() { } return this; } + /** * * @@ -1931,6 +2014,7 @@ public Builder clearDailyRecurrence() { public com.google.firestore.admin.v1.DailyRecurrence.Builder getDailyRecurrenceBuilder() { return getDailyRecurrenceFieldBuilder().getBuilder(); } + /** * * @@ -1951,6 +2035,7 @@ public com.google.firestore.admin.v1.DailyRecurrenceOrBuilder getDailyRecurrence return com.google.firestore.admin.v1.DailyRecurrence.getDefaultInstance(); } } + /** * * @@ -1989,6 +2074,7 @@ public com.google.firestore.admin.v1.DailyRecurrenceOrBuilder getDailyRecurrence com.google.firestore.admin.v1.WeeklyRecurrence.Builder, com.google.firestore.admin.v1.WeeklyRecurrenceOrBuilder> weeklyRecurrenceBuilder_; + /** * * @@ -2004,6 +2090,7 @@ public com.google.firestore.admin.v1.DailyRecurrenceOrBuilder getDailyRecurrence public boolean hasWeeklyRecurrence() { return recurrenceCase_ == 8; } + /** * * @@ -2029,6 +2116,7 @@ public com.google.firestore.admin.v1.WeeklyRecurrence getWeeklyRecurrence() { return com.google.firestore.admin.v1.WeeklyRecurrence.getDefaultInstance(); } } + /** * * @@ -2051,6 +2139,7 @@ public Builder setWeeklyRecurrence(com.google.firestore.admin.v1.WeeklyRecurrenc recurrenceCase_ = 8; return this; } + /** * * @@ -2071,6 +2160,7 @@ public Builder setWeeklyRecurrence( recurrenceCase_ = 8; return this; } + /** * * @@ -2103,6 +2193,7 @@ public Builder mergeWeeklyRecurrence(com.google.firestore.admin.v1.WeeklyRecurre recurrenceCase_ = 8; return this; } + /** * * @@ -2128,6 +2219,7 @@ public Builder clearWeeklyRecurrence() { } return this; } + /** * * @@ -2140,6 +2232,7 @@ public Builder clearWeeklyRecurrence() { public com.google.firestore.admin.v1.WeeklyRecurrence.Builder getWeeklyRecurrenceBuilder() { return getWeeklyRecurrenceFieldBuilder().getBuilder(); } + /** * * @@ -2160,6 +2253,7 @@ public com.google.firestore.admin.v1.WeeklyRecurrenceOrBuilder getWeeklyRecurren return com.google.firestore.admin.v1.WeeklyRecurrence.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleName.java index def9a8fdf..ac2822799 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleOrBuilder.java index 723400cee..33ae89446 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BackupScheduleOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/schedule.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface BackupScheduleOrBuilder @@ -42,6 +42,7 @@ public interface BackupScheduleOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -77,6 +78,7 @@ public interface BackupScheduleOrBuilder * @return Whether the createTime field is set. */ boolean hasCreateTime(); + /** * * @@ -93,6 +95,7 @@ public interface BackupScheduleOrBuilder * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); + /** * * @@ -123,6 +126,7 @@ public interface BackupScheduleOrBuilder * @return Whether the updateTime field is set. */ boolean hasUpdateTime(); + /** * * @@ -138,6 +142,7 @@ public interface BackupScheduleOrBuilder * @return The updateTime. */ com.google.protobuf.Timestamp getUpdateTime(); + /** * * @@ -158,6 +163,8 @@ public interface BackupScheduleOrBuilder *
    * At what relative time in the future, compared to its creation time,
    * the backup should be deleted, e.g. keep backups for 7 days.
+   *
+   * The maximum supported retention period is 14 weeks.
    * 
* * .google.protobuf.Duration retention = 6; @@ -165,12 +172,15 @@ public interface BackupScheduleOrBuilder * @return Whether the retention field is set. */ boolean hasRetention(); + /** * * *
    * At what relative time in the future, compared to its creation time,
    * the backup should be deleted, e.g. keep backups for 7 days.
+   *
+   * The maximum supported retention period is 14 weeks.
    * 
* * .google.protobuf.Duration retention = 6; @@ -178,12 +188,15 @@ public interface BackupScheduleOrBuilder * @return The retention. */ com.google.protobuf.Duration getRetention(); + /** * * *
    * At what relative time in the future, compared to its creation time,
    * the backup should be deleted, e.g. keep backups for 7 days.
+   *
+   * The maximum supported retention period is 14 weeks.
    * 
* * .google.protobuf.Duration retention = 6; @@ -202,6 +215,7 @@ public interface BackupScheduleOrBuilder * @return Whether the dailyRecurrence field is set. */ boolean hasDailyRecurrence(); + /** * * @@ -214,6 +228,7 @@ public interface BackupScheduleOrBuilder * @return The dailyRecurrence. */ com.google.firestore.admin.v1.DailyRecurrence getDailyRecurrence(); + /** * * @@ -237,6 +252,7 @@ public interface BackupScheduleOrBuilder * @return Whether the weeklyRecurrence field is set. */ boolean hasWeeklyRecurrence(); + /** * * @@ -249,6 +265,7 @@ public interface BackupScheduleOrBuilder * @return The weeklyRecurrence. */ com.google.firestore.admin.v1.WeeklyRecurrence getWeeklyRecurrence(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadata.java index b92e2dca5..224efe03d 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -35,6 +35,7 @@ public final class BulkDeleteDocumentsMetadata extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.BulkDeleteDocumentsMetadata) BulkDeleteDocumentsMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use BulkDeleteDocumentsMetadata.newBuilder() to construct. private BulkDeleteDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int START_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -85,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +103,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -116,6 +120,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -132,6 +137,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -148,6 +154,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -165,6 +172,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int OPERATION_STATE_FIELD_NUMBER = 3; private int operationState_ = 0; + /** * * @@ -180,6 +188,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -200,6 +209,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 4; private com.google.firestore.admin.v1.Progress progressDocuments_; + /** * * @@ -215,6 +225,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -232,6 +243,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressDocuments_; } + /** * * @@ -250,6 +262,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public static final int PROGRESS_BYTES_FIELD_NUMBER = 5; private com.google.firestore.admin.v1.Progress progressBytes_; + /** * * @@ -265,6 +278,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -282,6 +296,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressBytes_; } + /** * * @@ -303,11 +318,12 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -317,11 +333,12 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder public com.google.protobuf.ProtocolStringList getCollectionIdsList() { return collectionIds_; } + /** * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -331,11 +348,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -346,11 +364,12 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -367,11 +386,12 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -381,11 +401,12 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { return namespaceIds_; } + /** * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -395,11 +416,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -410,11 +432,12 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -428,6 +451,7 @@ public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { public static final int SNAPSHOT_TIME_FIELD_NUMBER = 8; private com.google.protobuf.Timestamp snapshotTime_; + /** * * @@ -446,6 +470,7 @@ public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -466,6 +491,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { ? com.google.protobuf.Timestamp.getDefaultInstance() : snapshotTime_; } + /** * * @@ -749,6 +775,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1093,6 +1120,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -1107,6 +1135,7 @@ public Builder mergeFrom( public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1125,6 +1154,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -1147,6 +1177,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1166,6 +1197,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1193,6 +1225,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1212,6 +1245,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1226,6 +1260,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1242,6 +1277,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1274,6 +1310,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1289,6 +1326,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1308,6 +1346,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1331,6 +1370,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1351,6 +1391,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1379,6 +1420,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1399,6 +1441,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1414,6 +1457,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1431,6 +1475,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1459,6 +1504,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private int operationState_ = 0; + /** * * @@ -1474,6 +1520,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -1492,6 +1539,7 @@ public Builder setOperationStateValue(int value) { onChanged(); return this; } + /** * * @@ -1509,6 +1557,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { com.google.firestore.admin.v1.OperationState.forNumber(operationState_); return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; } + /** * * @@ -1530,6 +1579,7 @@ public Builder setOperationState(com.google.firestore.admin.v1.OperationState va onChanged(); return this; } + /** * * @@ -1554,6 +1604,7 @@ public Builder clearOperationState() { com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressDocumentsBuilder_; + /** * * @@ -1568,6 +1619,7 @@ public Builder clearOperationState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1588,6 +1640,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocumentsBuilder_.getMessage(); } } + /** * * @@ -1610,6 +1663,7 @@ public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value onChanged(); return this; } + /** * * @@ -1630,6 +1684,7 @@ public Builder setProgressDocuments( onChanged(); return this; } + /** * * @@ -1657,6 +1712,7 @@ public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress val } return this; } + /** * * @@ -1676,6 +1732,7 @@ public Builder clearProgressDocuments() { onChanged(); return this; } + /** * * @@ -1690,6 +1747,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilde onChanged(); return getProgressDocumentsFieldBuilder().getBuilder(); } + /** * * @@ -1708,6 +1766,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui : progressDocuments_; } } + /** * * @@ -1740,6 +1799,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressBytesBuilder_; + /** * * @@ -1754,6 +1814,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1774,6 +1835,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytesBuilder_.getMessage(); } } + /** * * @@ -1796,6 +1858,7 @@ public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { onChanged(); return this; } + /** * * @@ -1816,6 +1879,7 @@ public Builder setProgressBytes( onChanged(); return this; } + /** * * @@ -1843,6 +1907,7 @@ public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) } return this; } + /** * * @@ -1862,6 +1927,7 @@ public Builder clearProgressBytes() { onChanged(); return this; } + /** * * @@ -1876,6 +1942,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() onChanged(); return getProgressBytesFieldBuilder().getBuilder(); } + /** * * @@ -1894,6 +1961,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder : progressBytes_; } } + /** * * @@ -1929,11 +1997,12 @@ private void ensureCollectionIdsIsMutable() { } bitField0_ |= 0x00000020; } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -1944,11 +2013,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { collectionIds_.makeImmutable(); return collectionIds_; } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -1958,11 +2028,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -1973,11 +2044,12 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -1988,11 +2060,12 @@ public java.lang.String getCollectionIds(int index) { public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { return collectionIds_.getByteString(index); } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -2011,11 +2084,12 @@ public Builder setCollectionIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -2033,11 +2107,12 @@ public Builder addCollectionIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -2052,11 +2127,12 @@ public Builder addAllCollectionIds(java.lang.Iterable values) onChanged(); return this; } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -2070,11 +2146,12 @@ public Builder clearCollectionIds() { onChanged(); return this; } + /** * * *
-     * The ids of the collection groups that are being deleted.
+     * The IDs of the collection groups that are being deleted.
      * 
* * repeated string collection_ids = 6; @@ -2103,11 +2180,12 @@ private void ensureNamespaceIdsIsMutable() { } bitField0_ |= 0x00000040; } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2118,11 +2196,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { namespaceIds_.makeImmutable(); return namespaceIds_; } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2132,11 +2211,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2147,11 +2227,12 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2162,11 +2243,12 @@ public java.lang.String getNamespaceIds(int index) { public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { return namespaceIds_.getByteString(index); } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2185,11 +2267,12 @@ public Builder setNamespaceIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2207,11 +2290,12 @@ public Builder addNamespaceIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2226,11 +2310,12 @@ public Builder addAllNamespaceIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2244,11 +2329,12 @@ public Builder clearNamespaceIds() { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being deleted.
+     * Which namespace IDs are being deleted.
      * 
* * repeated string namespace_ids = 7; @@ -2274,6 +2360,7 @@ public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> snapshotTimeBuilder_; + /** * * @@ -2291,6 +2378,7 @@ public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000080) != 0); } + /** * * @@ -2314,6 +2402,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { return snapshotTimeBuilder_.getMessage(); } } + /** * * @@ -2339,6 +2428,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2361,6 +2451,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp.Builder builderForV onChanged(); return this; } + /** * * @@ -2391,6 +2482,7 @@ public Builder mergeSnapshotTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2413,6 +2505,7 @@ public Builder clearSnapshotTime() { onChanged(); return this; } + /** * * @@ -2430,6 +2523,7 @@ public com.google.protobuf.Timestamp.Builder getSnapshotTimeBuilder() { onChanged(); return getSnapshotTimeFieldBuilder().getBuilder(); } + /** * * @@ -2451,6 +2545,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { : snapshotTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadataOrBuilder.java index 9686f1fec..b8f6e2d2d 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface BulkDeleteDocumentsMetadataOrBuilder @@ -36,6 +36,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -48,6 +49,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -72,6 +74,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -85,6 +88,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -109,6 +113,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The enum numeric value on the wire for operationState. */ int getOperationStateValue(); + /** * * @@ -134,6 +139,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return Whether the progressDocuments field is set. */ boolean hasProgressDocuments(); + /** * * @@ -146,6 +152,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The progressDocuments. */ com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** * * @@ -169,6 +176,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return Whether the progressBytes field is set. */ boolean hasProgressBytes(); + /** * * @@ -181,6 +189,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The progressBytes. */ com.google.firestore.admin.v1.Progress getProgressBytes(); + /** * * @@ -196,7 +205,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -204,11 +213,12 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return A list containing the collectionIds. */ java.util.List getCollectionIdsList(); + /** * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -216,11 +226,12 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The count of collectionIds. */ int getCollectionIdsCount(); + /** * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -229,11 +240,12 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The collectionIds at the given index. */ java.lang.String getCollectionIds(int index); + /** * * *
-   * The ids of the collection groups that are being deleted.
+   * The IDs of the collection groups that are being deleted.
    * 
* * repeated string collection_ids = 6; @@ -247,7 +259,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -255,11 +267,12 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return A list containing the namespaceIds. */ java.util.List getNamespaceIdsList(); + /** * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -267,11 +280,12 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The count of namespaceIds. */ int getNamespaceIdsCount(); + /** * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -280,11 +294,12 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The namespaceIds at the given index. */ java.lang.String getNamespaceIds(int index); + /** * * *
-   * Which namespace ids are being deleted.
+   * Which namespace IDs are being deleted.
    * 
* * repeated string namespace_ids = 7; @@ -309,6 +324,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return Whether the snapshotTime field is set. */ boolean hasSnapshotTime(); + /** * * @@ -324,6 +340,7 @@ public interface BulkDeleteDocumentsMetadataOrBuilder * @return The snapshotTime. */ com.google.protobuf.Timestamp getSnapshotTime(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequest.java index 85de49f35..8f475a216 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -42,6 +42,7 @@ public final class BulkDeleteDocumentsRequest extends com.google.protobuf.Genera // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.BulkDeleteDocumentsRequest) BulkDeleteDocumentsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use BulkDeleteDocumentsRequest.newBuilder() to construct. private BulkDeleteDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -78,6 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -104,6 +106,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -136,6 +139,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -153,6 +157,7 @@ public com.google.protobuf.ByteString getNameBytes() { public com.google.protobuf.ProtocolStringList getCollectionIdsList() { return collectionIds_; } + /** * * @@ -170,6 +175,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * @@ -188,6 +194,7 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * @@ -212,6 +219,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -235,6 +243,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { return namespaceIds_; } + /** * * @@ -258,6 +267,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * @@ -282,6 +292,7 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * @@ -499,6 +510,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -736,6 +748,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -761,6 +774,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -786,6 +800,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -810,6 +825,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -830,6 +846,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -865,6 +882,7 @@ private void ensureCollectionIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -883,6 +901,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { collectionIds_.makeImmutable(); return collectionIds_; } + /** * * @@ -900,6 +919,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * @@ -918,6 +938,7 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * @@ -936,6 +957,7 @@ public java.lang.String getCollectionIds(int index) { public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { return collectionIds_.getByteString(index); } + /** * * @@ -962,6 +984,7 @@ public Builder setCollectionIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -987,6 +1010,7 @@ public Builder addCollectionIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1009,6 +1033,7 @@ public Builder addAllCollectionIds(java.lang.Iterable values) onChanged(); return this; } + /** * * @@ -1030,6 +1055,7 @@ public Builder clearCollectionIds() { onChanged(); return this; } + /** * * @@ -1066,6 +1092,7 @@ private void ensureNamespaceIdsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * @@ -1090,6 +1117,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { namespaceIds_.makeImmutable(); return namespaceIds_; } + /** * * @@ -1113,6 +1141,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * @@ -1137,6 +1166,7 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * @@ -1161,6 +1191,7 @@ public java.lang.String getNamespaceIds(int index) { public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { return namespaceIds_.getByteString(index); } + /** * * @@ -1193,6 +1224,7 @@ public Builder setNamespaceIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1224,6 +1256,7 @@ public Builder addNamespaceIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1252,6 +1285,7 @@ public Builder addAllNamespaceIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -1279,6 +1313,7 @@ public Builder clearNamespaceIds() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequestOrBuilder.java index 3d8cbb3fb..944f02bf9 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface BulkDeleteDocumentsRequestOrBuilder @@ -39,6 +39,7 @@ public interface BulkDeleteDocumentsRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +71,7 @@ public interface BulkDeleteDocumentsRequestOrBuilder * @return A list containing the collectionIds. */ java.util.List getCollectionIdsList(); + /** * * @@ -85,6 +87,7 @@ public interface BulkDeleteDocumentsRequestOrBuilder * @return The count of collectionIds. */ int getCollectionIdsCount(); + /** * * @@ -101,6 +104,7 @@ public interface BulkDeleteDocumentsRequestOrBuilder * @return The collectionIds at the given index. */ java.lang.String getCollectionIds(int index); + /** * * @@ -139,6 +143,7 @@ public interface BulkDeleteDocumentsRequestOrBuilder * @return A list containing the namespaceIds. */ java.util.List getNamespaceIdsList(); + /** * * @@ -160,6 +165,7 @@ public interface BulkDeleteDocumentsRequestOrBuilder * @return The count of namespaceIds. */ int getNamespaceIdsCount(); + /** * * @@ -182,6 +188,7 @@ public interface BulkDeleteDocumentsRequestOrBuilder * @return The namespaceIds at the given index. */ java.lang.String getNamespaceIds(int index); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponse.java index 92d0b8ae8..b38563499 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class BulkDeleteDocumentsResponse extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.BulkDeleteDocumentsResponse) BulkDeleteDocumentsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use BulkDeleteDocumentsResponse.newBuilder() to construct. private BulkDeleteDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -213,6 +214,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponseOrBuilder.java index 09e2e9768..3d8961a97 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface BulkDeleteDocumentsResponseOrBuilder diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseMetadata.java new file mode 100644 index 000000000..c3e227d4a --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseMetadata.java @@ -0,0 +1,1915 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Metadata for the [long-running operation][google.longrunning.Operation] from
+ * the [CloneDatabase][google.firestore.admin.v1.CloneDatabase] request.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CloneDatabaseMetadata} + */ +public final class CloneDatabaseMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CloneDatabaseMetadata) + CloneDatabaseMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CloneDatabaseMetadata.newBuilder() to construct. + private CloneDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloneDatabaseMetadata() { + operationState_ = 0; + database_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloneDatabaseMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CloneDatabaseMetadata.class, + com.google.firestore.admin.v1.CloneDatabaseMetadata.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * The time the clone was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The time the clone was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * The time the clone was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * The time the clone finished, unset for ongoing clones.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The time the clone finished, unset for ongoing clones.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * The time the clone finished, unset for ongoing clones.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int OPERATION_STATE_FIELD_NUMBER = 3; + private int operationState_ = 0; + + /** + * + * + *
+   * The operation state of the clone.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The enum numeric value on the wire for operationState. + */ + @java.lang.Override + public int getOperationStateValue() { + return operationState_; + } + + /** + * + * + *
+   * The operation state of the clone.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The operationState. + */ + @java.lang.Override + public com.google.firestore.admin.v1.OperationState getOperationState() { + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.forNumber(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + + public static final int DATABASE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + + /** + * + * + *
+   * The name of the database being cloned to.
+   * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the database being cloned to.
+   * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PITR_SNAPSHOT_FIELD_NUMBER = 7; + private com.google.firestore.admin.v1.PitrSnapshot pitrSnapshot_; + + /** + * + * + *
+   * The snapshot from which this database was cloned.
+   * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * + * @return Whether the pitrSnapshot field is set. + */ + @java.lang.Override + public boolean hasPitrSnapshot() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * The snapshot from which this database was cloned.
+   * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * + * @return The pitrSnapshot. + */ + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshot getPitrSnapshot() { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } + + /** + * + * + *
+   * The snapshot from which this database was cloned.
+   * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshotOrBuilder getPitrSnapshotOrBuilder() { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } + + public static final int PROGRESS_PERCENTAGE_FIELD_NUMBER = 6; + private com.google.firestore.admin.v1.Progress progressPercentage_; + + /** + * + * + *
+   * How far along the clone is as an estimated percentage of remaining time.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + * + * @return Whether the progressPercentage field is set. + */ + @java.lang.Override + public boolean hasProgressPercentage() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * How far along the clone is as an estimated percentage of remaining time.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + * + * @return The progressPercentage. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Progress getProgressPercentage() { + return progressPercentage_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressPercentage_; + } + + /** + * + * + *
+   * How far along the clone is as an estimated percentage of remaining time.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + @java.lang.Override + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressPercentageOrBuilder() { + return progressPercentage_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressPercentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, operationState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, database_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getProgressPercentage()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getPitrSnapshot()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, operationState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, database_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProgressPercentage()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPitrSnapshot()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.CloneDatabaseMetadata)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.CloneDatabaseMetadata other = + (com.google.firestore.admin.v1.CloneDatabaseMetadata) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (operationState_ != other.operationState_) return false; + if (!getDatabase().equals(other.getDatabase())) return false; + if (hasPitrSnapshot() != other.hasPitrSnapshot()) return false; + if (hasPitrSnapshot()) { + if (!getPitrSnapshot().equals(other.getPitrSnapshot())) return false; + } + if (hasProgressPercentage() != other.hasProgressPercentage()) return false; + if (hasProgressPercentage()) { + if (!getProgressPercentage().equals(other.getProgressPercentage())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + OPERATION_STATE_FIELD_NUMBER; + hash = (53 * hash) + operationState_; + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + if (hasPitrSnapshot()) { + hash = (37 * hash) + PITR_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getPitrSnapshot().hashCode(); + } + if (hasProgressPercentage()) { + hash = (37 * hash) + PROGRESS_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressPercentage().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.CloneDatabaseMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata for the [long-running operation][google.longrunning.Operation] from
+   * the [CloneDatabase][google.firestore.admin.v1.CloneDatabase] request.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CloneDatabaseMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.CloneDatabaseMetadata) + com.google.firestore.admin.v1.CloneDatabaseMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CloneDatabaseMetadata.class, + com.google.firestore.admin.v1.CloneDatabaseMetadata.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.CloneDatabaseMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + getPitrSnapshotFieldBuilder(); + getProgressPercentageFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + operationState_ = 0; + database_ = ""; + pitrSnapshot_ = null; + if (pitrSnapshotBuilder_ != null) { + pitrSnapshotBuilder_.dispose(); + pitrSnapshotBuilder_ = null; + } + progressPercentage_ = null; + if (progressPercentageBuilder_ != null) { + progressPercentageBuilder_.dispose(); + progressPercentageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseMetadata getDefaultInstanceForType() { + return com.google.firestore.admin.v1.CloneDatabaseMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseMetadata build() { + com.google.firestore.admin.v1.CloneDatabaseMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseMetadata buildPartial() { + com.google.firestore.admin.v1.CloneDatabaseMetadata result = + new com.google.firestore.admin.v1.CloneDatabaseMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.CloneDatabaseMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.operationState_ = operationState_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.database_ = database_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pitrSnapshot_ = + pitrSnapshotBuilder_ == null ? pitrSnapshot_ : pitrSnapshotBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.progressPercentage_ = + progressPercentageBuilder_ == null + ? progressPercentage_ + : progressPercentageBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.CloneDatabaseMetadata) { + return mergeFrom((com.google.firestore.admin.v1.CloneDatabaseMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.CloneDatabaseMetadata other) { + if (other == com.google.firestore.admin.v1.CloneDatabaseMetadata.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.operationState_ != 0) { + setOperationStateValue(other.getOperationStateValue()); + } + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasPitrSnapshot()) { + mergePitrSnapshot(other.getPitrSnapshot()); + } + if (other.hasProgressPercentage()) { + mergeProgressPercentage(other.getProgressPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + operationState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + input.readMessage( + getProgressPercentageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getPitrSnapshotFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * The time the clone was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * The time the clone finished, unset for ongoing clones.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int operationState_ = 0; + + /** + * + * + *
+     * The operation state of the clone.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The enum numeric value on the wire for operationState. + */ + @java.lang.Override + public int getOperationStateValue() { + return operationState_; + } + + /** + * + * + *
+     * The operation state of the clone.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @param value The enum numeric value on the wire for operationState to set. + * @return This builder for chaining. + */ + public Builder setOperationStateValue(int value) { + operationState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The operation state of the clone.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The operationState. + */ + @java.lang.Override + public com.google.firestore.admin.v1.OperationState getOperationState() { + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.forNumber(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * The operation state of the clone.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @param value The operationState to set. + * @return This builder for chaining. + */ + public Builder setOperationState(com.google.firestore.admin.v1.OperationState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + operationState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The operation state of the clone.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return This builder for chaining. + */ + public Builder clearOperationState() { + bitField0_ = (bitField0_ & ~0x00000004); + operationState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object database_ = ""; + + /** + * + * + *
+     * The name of the database being cloned to.
+     * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the database being cloned to.
+     * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for database. + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the database being cloned to.
+     * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the database being cloned to.
+     * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the database being cloned to.
+     * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.PitrSnapshot pitrSnapshot_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.PitrSnapshot, + com.google.firestore.admin.v1.PitrSnapshot.Builder, + com.google.firestore.admin.v1.PitrSnapshotOrBuilder> + pitrSnapshotBuilder_; + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * + * @return Whether the pitrSnapshot field is set. + */ + public boolean hasPitrSnapshot() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * + * @return The pitrSnapshot. + */ + public com.google.firestore.admin.v1.PitrSnapshot getPitrSnapshot() { + if (pitrSnapshotBuilder_ == null) { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } else { + return pitrSnapshotBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + public Builder setPitrSnapshot(com.google.firestore.admin.v1.PitrSnapshot value) { + if (pitrSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pitrSnapshot_ = value; + } else { + pitrSnapshotBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + public Builder setPitrSnapshot( + com.google.firestore.admin.v1.PitrSnapshot.Builder builderForValue) { + if (pitrSnapshotBuilder_ == null) { + pitrSnapshot_ = builderForValue.build(); + } else { + pitrSnapshotBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + public Builder mergePitrSnapshot(com.google.firestore.admin.v1.PitrSnapshot value) { + if (pitrSnapshotBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && pitrSnapshot_ != null + && pitrSnapshot_ != com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance()) { + getPitrSnapshotBuilder().mergeFrom(value); + } else { + pitrSnapshot_ = value; + } + } else { + pitrSnapshotBuilder_.mergeFrom(value); + } + if (pitrSnapshot_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + public Builder clearPitrSnapshot() { + bitField0_ = (bitField0_ & ~0x00000010); + pitrSnapshot_ = null; + if (pitrSnapshotBuilder_ != null) { + pitrSnapshotBuilder_.dispose(); + pitrSnapshotBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + public com.google.firestore.admin.v1.PitrSnapshot.Builder getPitrSnapshotBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPitrSnapshotFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + public com.google.firestore.admin.v1.PitrSnapshotOrBuilder getPitrSnapshotOrBuilder() { + if (pitrSnapshotBuilder_ != null) { + return pitrSnapshotBuilder_.getMessageOrBuilder(); + } else { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } + } + + /** + * + * + *
+     * The snapshot from which this database was cloned.
+     * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.PitrSnapshot, + com.google.firestore.admin.v1.PitrSnapshot.Builder, + com.google.firestore.admin.v1.PitrSnapshotOrBuilder> + getPitrSnapshotFieldBuilder() { + if (pitrSnapshotBuilder_ == null) { + pitrSnapshotBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.PitrSnapshot, + com.google.firestore.admin.v1.PitrSnapshot.Builder, + com.google.firestore.admin.v1.PitrSnapshotOrBuilder>( + getPitrSnapshot(), getParentForChildren(), isClean()); + pitrSnapshot_ = null; + } + return pitrSnapshotBuilder_; + } + + private com.google.firestore.admin.v1.Progress progressPercentage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressPercentageBuilder_; + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + * + * @return Whether the progressPercentage field is set. + */ + public boolean hasProgressPercentage() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + * + * @return The progressPercentage. + */ + public com.google.firestore.admin.v1.Progress getProgressPercentage() { + if (progressPercentageBuilder_ == null) { + return progressPercentage_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressPercentage_; + } else { + return progressPercentageBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + public Builder setProgressPercentage(com.google.firestore.admin.v1.Progress value) { + if (progressPercentageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressPercentage_ = value; + } else { + progressPercentageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + public Builder setProgressPercentage( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressPercentageBuilder_ == null) { + progressPercentage_ = builderForValue.build(); + } else { + progressPercentageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + public Builder mergeProgressPercentage(com.google.firestore.admin.v1.Progress value) { + if (progressPercentageBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && progressPercentage_ != null + && progressPercentage_ != com.google.firestore.admin.v1.Progress.getDefaultInstance()) { + getProgressPercentageBuilder().mergeFrom(value); + } else { + progressPercentage_ = value; + } + } else { + progressPercentageBuilder_.mergeFrom(value); + } + if (progressPercentage_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + public Builder clearProgressPercentage() { + bitField0_ = (bitField0_ & ~0x00000020); + progressPercentage_ = null; + if (progressPercentageBuilder_ != null) { + progressPercentageBuilder_.dispose(); + progressPercentageBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressPercentageBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getProgressPercentageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressPercentageOrBuilder() { + if (progressPercentageBuilder_ != null) { + return progressPercentageBuilder_.getMessageOrBuilder(); + } else { + return progressPercentage_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressPercentage_; + } + } + + /** + * + * + *
+     * How far along the clone is as an estimated percentage of remaining time.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressPercentageFieldBuilder() { + if (progressPercentageBuilder_ == null) { + progressPercentageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressPercentage(), getParentForChildren(), isClean()); + progressPercentage_ = null; + } + return progressPercentageBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.CloneDatabaseMetadata) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.CloneDatabaseMetadata) + private static final com.google.firestore.admin.v1.CloneDatabaseMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.CloneDatabaseMetadata(); + } + + public static com.google.firestore.admin.v1.CloneDatabaseMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloneDatabaseMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseMetadataOrBuilder.java new file mode 100644 index 000000000..abfb31b8d --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseMetadataOrBuilder.java @@ -0,0 +1,226 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface CloneDatabaseMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.CloneDatabaseMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time the clone was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * The time the clone was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * The time the clone was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time the clone finished, unset for ongoing clones.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * The time the clone finished, unset for ongoing clones.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * The time the clone finished, unset for ongoing clones.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * The operation state of the clone.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The enum numeric value on the wire for operationState. + */ + int getOperationStateValue(); + + /** + * + * + *
+   * The operation state of the clone.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The operationState. + */ + com.google.firestore.admin.v1.OperationState getOperationState(); + + /** + * + * + *
+   * The name of the database being cloned to.
+   * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @return The database. + */ + java.lang.String getDatabase(); + + /** + * + * + *
+   * The name of the database being cloned to.
+   * 
+ * + * string database = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for database. + */ + com.google.protobuf.ByteString getDatabaseBytes(); + + /** + * + * + *
+   * The snapshot from which this database was cloned.
+   * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * + * @return Whether the pitrSnapshot field is set. + */ + boolean hasPitrSnapshot(); + + /** + * + * + *
+   * The snapshot from which this database was cloned.
+   * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * + * @return The pitrSnapshot. + */ + com.google.firestore.admin.v1.PitrSnapshot getPitrSnapshot(); + + /** + * + * + *
+   * The snapshot from which this database was cloned.
+   * 
+ * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + com.google.firestore.admin.v1.PitrSnapshotOrBuilder getPitrSnapshotOrBuilder(); + + /** + * + * + *
+   * How far along the clone is as an estimated percentage of remaining time.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + * + * @return Whether the progressPercentage field is set. + */ + boolean hasProgressPercentage(); + + /** + * + * + *
+   * How far along the clone is as an estimated percentage of remaining time.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + * + * @return The progressPercentage. + */ + com.google.firestore.admin.v1.Progress getProgressPercentage(); + + /** + * + * + *
+   * How far along the clone is as an estimated percentage of remaining time.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressPercentageOrBuilder(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseRequest.java new file mode 100644 index 000000000..a24175f35 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseRequest.java @@ -0,0 +1,2029 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request message for
+ * [FirestoreAdmin.CloneDatabase][google.firestore.admin.v1.FirestoreAdmin.CloneDatabase].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CloneDatabaseRequest} + */ +public final class CloneDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CloneDatabaseRequest) + CloneDatabaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CloneDatabaseRequest.newBuilder() to construct. + private CloneDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloneDatabaseRequest() { + parent_ = ""; + databaseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloneDatabaseRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CloneDatabaseRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CloneDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CloneDatabaseRequest.class, + com.google.firestore.admin.v1.CloneDatabaseRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project to clone the database in. Format is
+   * `projects/{project_id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The project to clone the database in. Format is
+   * `projects/{project_id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the database, which will become the final
+   * component of the database's resource name. This database ID must not be
+   * associated with an existing database.
+   *
+   * 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.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the database, which will become the final
+   * component of the database's resource name. This database ID must not be
+   * associated with an existing database.
+   *
+   * 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.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PITR_SNAPSHOT_FIELD_NUMBER = 6; + private com.google.firestore.admin.v1.PitrSnapshot pitrSnapshot_; + + /** + * + * + *
+   * Required. Specification of the PITR data to clone from. The source database
+   * must exist.
+   *
+   * The cloned database will be created in the same location as the source
+   * database.
+   * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pitrSnapshot field is set. + */ + @java.lang.Override + public boolean hasPitrSnapshot() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Specification of the PITR data to clone from. The source database
+   * must exist.
+   *
+   * The cloned database will be created in the same location as the source
+   * database.
+   * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pitrSnapshot. + */ + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshot getPitrSnapshot() { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } + + /** + * + * + *
+   * Required. Specification of the PITR data to clone from. The source database
+   * must exist.
+   *
+   * The cloned database will be created in the same location as the source
+   * database.
+   * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshotOrBuilder getPitrSnapshotOrBuilder() { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 4; + private com.google.firestore.admin.v1.Database.EncryptionConfig encryptionConfig_; + + /** + * + * + *
+   * Optional. Encryption configuration for the cloned database.
+   *
+   * If this field is not specified, the cloned database will use
+   * the same encryption configuration as the source database, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Encryption configuration for the cloned database.
+   *
+   * If this field is not specified, the cloned database will use
+   * the same encryption configuration as the source database, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + /** + * + * + *
+   * Optional. Encryption configuration for the cloned database.
+   *
+   * If this field is not specified, the cloned database will use
+   * the same encryption configuration as the source database, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + public static final int TAGS_FIELD_NUMBER = 5; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CloneDatabaseRequest_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, databaseId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getEncryptionConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getPitrSnapshot()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, databaseId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEncryptionConfig()); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, tags__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPitrSnapshot()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.CloneDatabaseRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.CloneDatabaseRequest other = + (com.google.firestore.admin.v1.CloneDatabaseRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (hasPitrSnapshot() != other.hasPitrSnapshot()) return false; + if (hasPitrSnapshot()) { + if (!getPitrSnapshot().equals(other.getPitrSnapshot())) return false; + } + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } + if (!internalGetTags().equals(other.internalGetTags())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + if (hasPitrSnapshot()) { + hash = (37 * hash) + PITR_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getPitrSnapshot().hashCode(); + } + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.CloneDatabaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request message for
+   * [FirestoreAdmin.CloneDatabase][google.firestore.admin.v1.FirestoreAdmin.CloneDatabase].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CloneDatabaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.CloneDatabaseRequest) + com.google.firestore.admin.v1.CloneDatabaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CloneDatabaseRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CloneDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CloneDatabaseRequest.class, + com.google.firestore.admin.v1.CloneDatabaseRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.CloneDatabaseRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPitrSnapshotFieldBuilder(); + getEncryptionConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + databaseId_ = ""; + pitrSnapshot_ = null; + if (pitrSnapshotBuilder_ != null) { + pitrSnapshotBuilder_.dispose(); + pitrSnapshotBuilder_ = null; + } + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + internalGetMutableTags().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CloneDatabaseRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.CloneDatabaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseRequest build() { + com.google.firestore.admin.v1.CloneDatabaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseRequest buildPartial() { + com.google.firestore.admin.v1.CloneDatabaseRequest result = + new com.google.firestore.admin.v1.CloneDatabaseRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.CloneDatabaseRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.databaseId_ = databaseId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pitrSnapshot_ = + pitrSnapshotBuilder_ == null ? pitrSnapshot_ : pitrSnapshotBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.encryptionConfig_ = + encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.CloneDatabaseRequest) { + return mergeFrom((com.google.firestore.admin.v1.CloneDatabaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.CloneDatabaseRequest other) { + if (other == com.google.firestore.admin.v1.CloneDatabaseRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPitrSnapshot()) { + mergePitrSnapshot(other.getPitrSnapshot()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getPitrSnapshotFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The project to clone the database in. Format is
+     * `projects/{project_id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The project to clone the database in. Format is
+     * `projects/{project_id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The project to clone the database in. Format is
+     * `projects/{project_id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project to clone the database in. Format is
+     * `projects/{project_id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project to clone the database in. Format is
+     * `projects/{project_id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the database, which will become the final
+     * component of the database's resource name. This database ID must not be
+     * associated with an existing database.
+     *
+     * 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.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the database, which will become the final
+     * component of the database's resource name. This database ID must not be
+     * associated with an existing database.
+     *
+     * 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.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the database, which will become the final
+     * component of the database's resource name. This database ID must not be
+     * associated with an existing database.
+     *
+     * 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.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the database, which will become the final
+     * component of the database's resource name. This database ID must not be
+     * associated with an existing database.
+     *
+     * 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.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the database, which will become the final
+     * component of the database's resource name. This database ID must not be
+     * associated with an existing database.
+     *
+     * 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.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.PitrSnapshot pitrSnapshot_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.PitrSnapshot, + com.google.firestore.admin.v1.PitrSnapshot.Builder, + com.google.firestore.admin.v1.PitrSnapshotOrBuilder> + pitrSnapshotBuilder_; + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pitrSnapshot field is set. + */ + public boolean hasPitrSnapshot() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pitrSnapshot. + */ + public com.google.firestore.admin.v1.PitrSnapshot getPitrSnapshot() { + if (pitrSnapshotBuilder_ == null) { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } else { + return pitrSnapshotBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPitrSnapshot(com.google.firestore.admin.v1.PitrSnapshot value) { + if (pitrSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pitrSnapshot_ = value; + } else { + pitrSnapshotBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPitrSnapshot( + com.google.firestore.admin.v1.PitrSnapshot.Builder builderForValue) { + if (pitrSnapshotBuilder_ == null) { + pitrSnapshot_ = builderForValue.build(); + } else { + pitrSnapshotBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePitrSnapshot(com.google.firestore.admin.v1.PitrSnapshot value) { + if (pitrSnapshotBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && pitrSnapshot_ != null + && pitrSnapshot_ != com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance()) { + getPitrSnapshotBuilder().mergeFrom(value); + } else { + pitrSnapshot_ = value; + } + } else { + pitrSnapshotBuilder_.mergeFrom(value); + } + if (pitrSnapshot_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPitrSnapshot() { + bitField0_ = (bitField0_ & ~0x00000004); + pitrSnapshot_ = null; + if (pitrSnapshotBuilder_ != null) { + pitrSnapshotBuilder_.dispose(); + pitrSnapshotBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.admin.v1.PitrSnapshot.Builder getPitrSnapshotBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPitrSnapshotFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.admin.v1.PitrSnapshotOrBuilder getPitrSnapshotOrBuilder() { + if (pitrSnapshotBuilder_ != null) { + return pitrSnapshotBuilder_.getMessageOrBuilder(); + } else { + return pitrSnapshot_ == null + ? com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance() + : pitrSnapshot_; + } + } + + /** + * + * + *
+     * Required. Specification of the PITR data to clone from. The source database
+     * must exist.
+     *
+     * The cloned database will be created in the same location as the source
+     * database.
+     * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.PitrSnapshot, + com.google.firestore.admin.v1.PitrSnapshot.Builder, + com.google.firestore.admin.v1.PitrSnapshotOrBuilder> + getPitrSnapshotFieldBuilder() { + if (pitrSnapshotBuilder_ == null) { + pitrSnapshotBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.PitrSnapshot, + com.google.firestore.admin.v1.PitrSnapshot.Builder, + com.google.firestore.admin.v1.PitrSnapshotOrBuilder>( + getPitrSnapshot(), getParentForChildren(), isClean()); + pitrSnapshot_ = null; + } + return pitrSnapshotBuilder_; + } + + private com.google.firestore.admin.v1.Database.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + public com.google.firestore.admin.v1.Database.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.firestore.admin.v1.Database.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionConfig( + com.google.firestore.admin.v1.Database.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && encryptionConfig_ != null + && encryptionConfig_ + != com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + if (encryptionConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.admin.v1.Database.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + + /** + * + * + *
+     * Optional. Encryption configuration for the cloned database.
+     *
+     * If this field is not specified, the cloned database will use
+     * the same encryption configuration as the source database, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the cloned database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the cloned database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the cloned database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the cloned database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the cloned database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + bitField0_ |= 0x00000010; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the cloned database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableTags().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the cloned database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.CloneDatabaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.CloneDatabaseRequest) + private static final com.google.firestore.admin.v1.CloneDatabaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.CloneDatabaseRequest(); + } + + public static com.google.firestore.admin.v1.CloneDatabaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloneDatabaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CloneDatabaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseRequestOrBuilder.java new file mode 100644 index 000000000..96d016b96 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CloneDatabaseRequestOrBuilder.java @@ -0,0 +1,298 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface CloneDatabaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.CloneDatabaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project to clone the database in. Format is
+   * `projects/{project_id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project to clone the database in. Format is
+   * `projects/{project_id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the database, which will become the final
+   * component of the database's resource name. This database ID must not be
+   * associated with an existing database.
+   *
+   * 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.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + + /** + * + * + *
+   * Required. The ID to use for the database, which will become the final
+   * component of the database's resource name. This database ID must not be
+   * associated with an existing database.
+   *
+   * 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.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * Required. Specification of the PITR data to clone from. The source database
+   * must exist.
+   *
+   * The cloned database will be created in the same location as the source
+   * database.
+   * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pitrSnapshot field is set. + */ + boolean hasPitrSnapshot(); + + /** + * + * + *
+   * Required. Specification of the PITR data to clone from. The source database
+   * must exist.
+   *
+   * The cloned database will be created in the same location as the source
+   * database.
+   * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pitrSnapshot. + */ + com.google.firestore.admin.v1.PitrSnapshot getPitrSnapshot(); + + /** + * + * + *
+   * Required. Specification of the PITR data to clone from. The source database
+   * must exist.
+   *
+   * The cloned database will be created in the same location as the source
+   * database.
+   * 
+ * + * + * .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.firestore.admin.v1.PitrSnapshotOrBuilder getPitrSnapshotOrBuilder(); + + /** + * + * + *
+   * Optional. Encryption configuration for the cloned database.
+   *
+   * If this field is not specified, the cloned database will use
+   * the same encryption configuration as the source database, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + + /** + * + * + *
+   * Optional. Encryption configuration for the cloned database.
+   *
+   * If this field is not specified, the cloned database will use
+   * the same encryption configuration as the source database, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + com.google.firestore.admin.v1.Database.EncryptionConfig getEncryptionConfig(); + + /** + * + * + *
+   * Optional. Encryption configuration for the cloned database.
+   *
+   * If this field is not specified, the cloned database will use
+   * the same encryption configuration as the source database, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsTags(java.lang.String key); + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getTagsMap(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the cloned database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getTagsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.java index 2f22984f8..5925b14d0 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequest.java index b30470fa7..f06c7b515 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class CreateBackupScheduleRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CreateBackupScheduleRequest) CreateBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateBackupScheduleRequest.newBuilder() to construct. private CreateBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int BACKUP_SCHEDULE_FIELD_NUMBER = 2; private com.google.firestore.admin.v1.BackupSchedule backupSchedule_; + /** * * @@ -143,6 +147,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasBackupSchedule() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -162,6 +167,7 @@ public com.google.firestore.admin.v1.BackupSchedule getBackupSchedule() { ? com.google.firestore.admin.v1.BackupSchedule.getDefaultInstance() : backupSchedule_; } + /** * * @@ -354,6 +360,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -569,6 +576,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -595,6 +603,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -621,6 +630,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -646,6 +656,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -667,6 +678,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -700,6 +712,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.admin.v1.BackupSchedule.Builder, com.google.firestore.admin.v1.BackupScheduleOrBuilder> backupScheduleBuilder_; + /** * * @@ -716,6 +729,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasBackupSchedule() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -738,6 +752,7 @@ public com.google.firestore.admin.v1.BackupSchedule getBackupSchedule() { return backupScheduleBuilder_.getMessage(); } } + /** * * @@ -762,6 +777,7 @@ public Builder setBackupSchedule(com.google.firestore.admin.v1.BackupSchedule va onChanged(); return this; } + /** * * @@ -784,6 +800,7 @@ public Builder setBackupSchedule( onChanged(); return this; } + /** * * @@ -814,6 +831,7 @@ public Builder mergeBackupSchedule(com.google.firestore.admin.v1.BackupSchedule } return this; } + /** * * @@ -835,6 +853,7 @@ public Builder clearBackupSchedule() { onChanged(); return this; } + /** * * @@ -851,6 +870,7 @@ public com.google.firestore.admin.v1.BackupSchedule.Builder getBackupScheduleBui onChanged(); return getBackupScheduleFieldBuilder().getBuilder(); } + /** * * @@ -871,6 +891,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupScheduleOr : backupSchedule_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequestOrBuilder.java index 53131c507..32bc568b8 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateBackupScheduleRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface CreateBackupScheduleRequestOrBuilder @@ -40,6 +40,7 @@ public interface CreateBackupScheduleRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -71,6 +72,7 @@ public interface CreateBackupScheduleRequestOrBuilder * @return Whether the backupSchedule field is set. */ boolean hasBackupSchedule(); + /** * * @@ -85,6 +87,7 @@ public interface CreateBackupScheduleRequestOrBuilder * @return The backupSchedule. */ com.google.firestore.admin.v1.BackupSchedule getBackupSchedule(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadata.java index 21bda802b..6f50fd8cf 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -33,6 +33,7 @@ public final class CreateDatabaseMetadata extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CreateDatabaseMetadata) CreateDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateDatabaseMetadata.newBuilder() to construct. private CreateDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -211,6 +212,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadataOrBuilder.java index 528df7251..2a669a4a7 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface CreateDatabaseMetadataOrBuilder diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequest.java index 14f66dfe6..652634e46 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class CreateDatabaseRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CreateDatabaseRequest) CreateDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateDatabaseRequest.newBuilder() to construct. private CreateDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -125,6 +128,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int DATABASE_FIELD_NUMBER = 2; private com.google.firestore.admin.v1.Database database_; + /** * * @@ -142,6 +146,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasDatabase() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -161,6 +166,7 @@ public com.google.firestore.admin.v1.Database getDatabase() { ? com.google.firestore.admin.v1.Database.getDefaultInstance() : database_; } + /** * * @@ -183,6 +189,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object databaseId_ = ""; + /** * * @@ -194,7 +201,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -213,6 +220,7 @@ public java.lang.String getDatabaseId() { return s; } } + /** * * @@ -224,7 +232,7 @@ public java.lang.String getDatabaseId() { * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -426,6 +434,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -655,6 +664,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -680,6 +690,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -705,6 +716,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -729,6 +741,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -749,6 +762,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -781,6 +795,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.admin.v1.Database.Builder, com.google.firestore.admin.v1.DatabaseOrBuilder> databaseBuilder_; + /** * * @@ -797,6 +812,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasDatabase() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -819,6 +835,7 @@ public com.google.firestore.admin.v1.Database getDatabase() { return databaseBuilder_.getMessage(); } } + /** * * @@ -843,6 +860,7 @@ public Builder setDatabase(com.google.firestore.admin.v1.Database value) { onChanged(); return this; } + /** * * @@ -864,6 +882,7 @@ public Builder setDatabase(com.google.firestore.admin.v1.Database.Builder builde onChanged(); return this; } + /** * * @@ -893,6 +912,7 @@ public Builder mergeDatabase(com.google.firestore.admin.v1.Database value) { } return this; } + /** * * @@ -914,6 +934,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -930,6 +951,7 @@ public com.google.firestore.admin.v1.Database.Builder getDatabaseBuilder() { onChanged(); return getDatabaseFieldBuilder().getBuilder(); } + /** * * @@ -950,6 +972,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { : database_; } } + /** * * @@ -979,6 +1002,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { } private java.lang.Object databaseId_ = ""; + /** * * @@ -990,7 +1014,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1008,6 +1032,7 @@ public java.lang.String getDatabaseId() { return (java.lang.String) ref; } } + /** * * @@ -1019,7 +1044,7 @@ public java.lang.String getDatabaseId() { * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1037,6 +1062,7 @@ public com.google.protobuf.ByteString getDatabaseIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1048,7 +1074,7 @@ public com.google.protobuf.ByteString getDatabaseIdBytes() { * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1065,6 +1091,7 @@ public Builder setDatabaseId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1076,7 +1103,7 @@ public Builder setDatabaseId(java.lang.String value) { * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1089,6 +1116,7 @@ public Builder clearDatabaseId() { onChanged(); return this; } + /** * * @@ -1100,7 +1128,7 @@ public Builder clearDatabaseId() { * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequestOrBuilder.java index 77121db4d..4a89ef436 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateDatabaseRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface CreateDatabaseRequestOrBuilder @@ -39,6 +39,7 @@ public interface CreateDatabaseRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +70,7 @@ public interface CreateDatabaseRequestOrBuilder * @return Whether the database field is set. */ boolean hasDatabase(); + /** * * @@ -83,6 +85,7 @@ public interface CreateDatabaseRequestOrBuilder * @return The database. */ com.google.firestore.admin.v1.Database getDatabase(); + /** * * @@ -107,7 +110,7 @@ public interface CreateDatabaseRequestOrBuilder * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -115,6 +118,7 @@ public interface CreateDatabaseRequestOrBuilder * @return The databaseId. */ java.lang.String getDatabaseId(); + /** * * @@ -126,7 +130,7 @@ public interface CreateDatabaseRequestOrBuilder * 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. * * * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java index b4030c388..77ead0fd1 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class CreateIndexRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CreateIndexRequest) CreateIndexRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateIndexRequest.newBuilder() to construct. private CreateIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -124,6 +127,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int INDEX_FIELD_NUMBER = 2; private com.google.firestore.admin.v1.Index index_; + /** * * @@ -140,6 +144,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasIndex() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -156,6 +161,7 @@ public boolean hasIndex() { public com.google.firestore.admin.v1.Index getIndex() { return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; } + /** * * @@ -344,6 +350,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -558,6 +565,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -583,6 +591,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -608,6 +617,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -632,6 +642,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -652,6 +663,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -684,6 +696,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.admin.v1.Index.Builder, com.google.firestore.admin.v1.IndexOrBuilder> indexBuilder_; + /** * * @@ -699,6 +712,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasIndex() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -718,6 +732,7 @@ public com.google.firestore.admin.v1.Index getIndex() { return indexBuilder_.getMessage(); } } + /** * * @@ -741,6 +756,7 @@ public Builder setIndex(com.google.firestore.admin.v1.Index value) { onChanged(); return this; } + /** * * @@ -761,6 +777,7 @@ public Builder setIndex(com.google.firestore.admin.v1.Index.Builder builderForVa onChanged(); return this; } + /** * * @@ -789,6 +806,7 @@ public Builder mergeIndex(com.google.firestore.admin.v1.Index value) { } return this; } + /** * * @@ -809,6 +827,7 @@ public Builder clearIndex() { onChanged(); return this; } + /** * * @@ -824,6 +843,7 @@ public com.google.firestore.admin.v1.Index.Builder getIndexBuilder() { onChanged(); return getIndexFieldBuilder().getBuilder(); } + /** * * @@ -841,6 +861,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.java index aaae79a06..cceedc1d4 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface CreateIndexRequestOrBuilder @@ -39,6 +39,7 @@ public interface CreateIndexRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -68,6 +69,7 @@ public interface CreateIndexRequestOrBuilder * @return Whether the index field is set. */ boolean hasIndex(); + /** * * @@ -81,6 +83,7 @@ public interface CreateIndexRequestOrBuilder * @return The index. */ com.google.firestore.admin.v1.Index getIndex(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateUserCredsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateUserCredsRequest.java new file mode 100644 index 000000000..84013d8cc --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateUserCredsRequest.java @@ -0,0 +1,1196 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.CreateUserCreds][google.firestore.admin.v1.FirestoreAdmin.CreateUserCreds].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CreateUserCredsRequest} + */ +public final class CreateUserCredsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CreateUserCredsRequest) + CreateUserCredsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateUserCredsRequest.newBuilder() to construct. + private CreateUserCredsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateUserCredsRequest() { + parent_ = ""; + userCredsId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateUserCredsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CreateUserCredsRequest.class, + com.google.firestore.admin.v1.CreateUserCredsRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. A parent name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A parent name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_CREDS_FIELD_NUMBER = 2; + private com.google.firestore.admin.v1.UserCreds userCreds_; + + /** + * + * + *
+   * Required. The user creds to create.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userCreds field is set. + */ + @java.lang.Override + public boolean hasUserCreds() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The user creds to create.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userCreds. + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds getUserCreds() { + return userCreds_ == null + ? com.google.firestore.admin.v1.UserCreds.getDefaultInstance() + : userCreds_; + } + + /** + * + * + *
+   * Required. The user creds to create.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCredsOrBuilder getUserCredsOrBuilder() { + return userCreds_ == null + ? com.google.firestore.admin.v1.UserCreds.getDefaultInstance() + : userCreds_; + } + + public static final int USER_CREDS_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object 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}/.
+   * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userCredsId. + */ + @java.lang.Override + public java.lang.String getUserCredsId() { + java.lang.Object ref = userCredsId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userCredsId_ = s; + return s; + } + } + + /** + * + * + *
+   * 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}/.
+   * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userCredsId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserCredsIdBytes() { + java.lang.Object ref = userCredsId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userCredsId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUserCreds()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userCredsId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userCredsId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserCreds()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userCredsId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userCredsId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.CreateUserCredsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.CreateUserCredsRequest other = + (com.google.firestore.admin.v1.CreateUserCredsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasUserCreds() != other.hasUserCreds()) return false; + if (hasUserCreds()) { + if (!getUserCreds().equals(other.getUserCreds())) return false; + } + if (!getUserCredsId().equals(other.getUserCredsId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasUserCreds()) { + hash = (37 * hash) + USER_CREDS_FIELD_NUMBER; + hash = (53 * hash) + getUserCreds().hashCode(); + } + hash = (37 * hash) + USER_CREDS_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserCredsId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.CreateUserCredsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [FirestoreAdmin.CreateUserCreds][google.firestore.admin.v1.FirestoreAdmin.CreateUserCreds].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CreateUserCredsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.CreateUserCredsRequest) + com.google.firestore.admin.v1.CreateUserCredsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CreateUserCredsRequest.class, + com.google.firestore.admin.v1.CreateUserCredsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.CreateUserCredsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUserCredsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + userCreds_ = null; + if (userCredsBuilder_ != null) { + userCredsBuilder_.dispose(); + userCredsBuilder_ = null; + } + userCredsId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateUserCredsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateUserCredsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.CreateUserCredsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateUserCredsRequest build() { + com.google.firestore.admin.v1.CreateUserCredsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateUserCredsRequest buildPartial() { + com.google.firestore.admin.v1.CreateUserCredsRequest result = + new com.google.firestore.admin.v1.CreateUserCredsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.CreateUserCredsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userCreds_ = userCredsBuilder_ == null ? userCreds_ : userCredsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userCredsId_ = userCredsId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.CreateUserCredsRequest) { + return mergeFrom((com.google.firestore.admin.v1.CreateUserCredsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.CreateUserCredsRequest other) { + if (other == com.google.firestore.admin.v1.CreateUserCredsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUserCreds()) { + mergeUserCreds(other.getUserCreds()); + } + if (!other.getUserCredsId().isEmpty()) { + userCredsId_ = other.userCredsId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUserCredsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + userCredsId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. A parent name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A parent name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A parent name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A parent name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A parent name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.UserCreds userCreds_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds, + com.google.firestore.admin.v1.UserCreds.Builder, + com.google.firestore.admin.v1.UserCredsOrBuilder> + userCredsBuilder_; + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userCreds field is set. + */ + public boolean hasUserCreds() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userCreds. + */ + public com.google.firestore.admin.v1.UserCreds getUserCreds() { + if (userCredsBuilder_ == null) { + return userCreds_ == null + ? com.google.firestore.admin.v1.UserCreds.getDefaultInstance() + : userCreds_; + } else { + return userCredsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserCreds(com.google.firestore.admin.v1.UserCreds value) { + if (userCredsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userCreds_ = value; + } else { + userCredsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserCreds(com.google.firestore.admin.v1.UserCreds.Builder builderForValue) { + if (userCredsBuilder_ == null) { + userCreds_ = builderForValue.build(); + } else { + userCredsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserCreds(com.google.firestore.admin.v1.UserCreds value) { + if (userCredsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && userCreds_ != null + && userCreds_ != com.google.firestore.admin.v1.UserCreds.getDefaultInstance()) { + getUserCredsBuilder().mergeFrom(value); + } else { + userCreds_ = value; + } + } else { + userCredsBuilder_.mergeFrom(value); + } + if (userCreds_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserCreds() { + bitField0_ = (bitField0_ & ~0x00000002); + userCreds_ = null; + if (userCredsBuilder_ != null) { + userCredsBuilder_.dispose(); + userCredsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.admin.v1.UserCreds.Builder getUserCredsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserCredsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.admin.v1.UserCredsOrBuilder getUserCredsOrBuilder() { + if (userCredsBuilder_ != null) { + return userCredsBuilder_.getMessageOrBuilder(); + } else { + return userCreds_ == null + ? com.google.firestore.admin.v1.UserCreds.getDefaultInstance() + : userCreds_; + } + } + + /** + * + * + *
+     * Required. The user creds to create.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds, + com.google.firestore.admin.v1.UserCreds.Builder, + com.google.firestore.admin.v1.UserCredsOrBuilder> + getUserCredsFieldBuilder() { + if (userCredsBuilder_ == null) { + userCredsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds, + com.google.firestore.admin.v1.UserCreds.Builder, + com.google.firestore.admin.v1.UserCredsOrBuilder>( + getUserCreds(), getParentForChildren(), isClean()); + userCreds_ = null; + } + return userCredsBuilder_; + } + + private java.lang.Object 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}/.
+     * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userCredsId. + */ + public java.lang.String getUserCredsId() { + java.lang.Object ref = userCredsId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userCredsId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * 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}/.
+     * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userCredsId. + */ + public com.google.protobuf.ByteString getUserCredsIdBytes() { + java.lang.Object ref = userCredsId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userCredsId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * 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}/.
+     * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The userCredsId to set. + * @return This builder for chaining. + */ + public Builder setUserCredsId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userCredsId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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}/.
+     * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUserCredsId() { + userCredsId_ = getDefaultInstance().getUserCredsId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * 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}/.
+     * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for userCredsId to set. + * @return This builder for chaining. + */ + public Builder setUserCredsIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userCredsId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.CreateUserCredsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.CreateUserCredsRequest) + private static final com.google.firestore.admin.v1.CreateUserCredsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.CreateUserCredsRequest(); + } + + public static com.google.firestore.admin.v1.CreateUserCredsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateUserCredsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateUserCredsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateUserCredsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateUserCredsRequestOrBuilder.java new file mode 100644 index 000000000..31f0607ec --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateUserCredsRequestOrBuilder.java @@ -0,0 +1,137 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface CreateUserCredsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.CreateUserCredsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A parent name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. A parent name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The user creds to create.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userCreds field is set. + */ + boolean hasUserCreds(); + + /** + * + * + *
+   * Required. The user creds to create.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userCreds. + */ + com.google.firestore.admin.v1.UserCreds getUserCreds(); + + /** + * + * + *
+   * Required. The user creds to create.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.firestore.admin.v1.UserCredsOrBuilder getUserCredsOrBuilder(); + + /** + * + * + *
+   * 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}/.
+   * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userCredsId. + */ + java.lang.String getUserCredsId(); + + /** + * + * + *
+   * 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}/.
+   * 
+ * + * string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userCredsId. + */ + com.google.protobuf.ByteString getUserCredsIdBytes(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrence.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrence.java index 353b9464e..3f84d1b0b 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrence.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrence.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. @@ -16,14 +16,14 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/schedule.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** * * *
- * Represents a recurring schedule that runs at a specific time every day.
+ * Represents a recurring schedule that runs every day.
  *
  * The time zone is UTC.
  * 
@@ -35,6 +35,7 @@ public final class DailyRecurrence extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DailyRecurrence) DailyRecurrenceOrBuilder { private static final long serialVersionUID = 0L; + // Use DailyRecurrence.newBuilder() to construct. private DailyRecurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -213,11 +214,12 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * *
-   * Represents a recurring schedule that runs at a specific time every day.
+   * Represents a recurring schedule that runs every day.
    *
    * The time zone is UTC.
    * 
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrenceOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrenceOrBuilder.java index 6ee832b1f..8d4b8ddb5 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrenceOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DailyRecurrenceOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/schedule.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface DailyRecurrenceOrBuilder diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Database.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Database.java index 255a6ee45..8e2694bca 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Database.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Database.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/database.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -33,6 +33,7 @@ public final class Database extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database) DatabaseOrBuilder { private static final long serialVersionUID = 0L; + // Use Database.newBuilder() to construct. private Database(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -48,7 +49,9 @@ private Database() { appEngineIntegrationMode_ = 0; keyPrefix_ = ""; deleteProtectionState_ = 0; + previousId_ = ""; etag_ = ""; + databaseEdition_ = 0; } @java.lang.Override @@ -62,6 +65,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_firestore_admin_v1_Database_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 29: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -90,7 +105,7 @@ public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The default value. This value is used if the database type is omitted.
+     * Not used.
      * 
* * DATABASE_TYPE_UNSPECIFIED = 0; @@ -123,12 +138,13 @@ public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The default value. This value is used if the database type is omitted.
+     * Not used.
      * 
* * DATABASE_TYPE_UNSPECIFIED = 0; */ public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -139,6 +155,7 @@ public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { * FIRESTORE_NATIVE = 1; */ public static final int FIRESTORE_NATIVE_VALUE = 1; + /** * * @@ -305,6 +322,7 @@ public enum ConcurrencyMode implements com.google.protobuf.ProtocolMessageEnum { * CONCURRENCY_MODE_UNSPECIFIED = 0; */ public static final int CONCURRENCY_MODE_UNSPECIFIED_VALUE = 0; + /** * * @@ -316,6 +334,7 @@ public enum ConcurrencyMode implements com.google.protobuf.ProtocolMessageEnum { * OPTIMISTIC = 1; */ public static final int OPTIMISTIC_VALUE = 1; + /** * * @@ -329,6 +348,7 @@ public enum ConcurrencyMode implements com.google.protobuf.ProtocolMessageEnum { * PESSIMISTIC = 2; */ public static final int PESSIMISTIC_VALUE = 2; + /** * * @@ -493,6 +513,7 @@ public enum PointInTimeRecoveryEnablement implements com.google.protobuf.Protoco * POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; */ public static final int POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED_VALUE = 0; + /** * * @@ -510,6 +531,7 @@ public enum PointInTimeRecoveryEnablement implements com.google.protobuf.Protoco * POINT_IN_TIME_RECOVERY_ENABLED = 1; */ public static final int POINT_IN_TIME_RECOVERY_ENABLED_VALUE = 1; + /** * * @@ -667,6 +689,7 @@ public enum AppEngineIntegrationMode implements com.google.protobuf.ProtocolMess * APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; */ public static final int APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED_VALUE = 0; + /** * * @@ -680,6 +703,7 @@ public enum AppEngineIntegrationMode implements com.google.protobuf.ProtocolMess * ENABLED = 1; */ public static final int ENABLED_VALUE = 1; + /** * * @@ -833,6 +857,7 @@ public enum DeleteProtectionState implements com.google.protobuf.ProtocolMessage * DELETE_PROTECTION_STATE_UNSPECIFIED = 0; */ public static final int DELETE_PROTECTION_STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -843,6 +868,7 @@ public enum DeleteProtectionState implements com.google.protobuf.ProtocolMessage * DELETE_PROTECTION_DISABLED = 1; */ public static final int DELETE_PROTECTION_DISABLED_VALUE = 1; + /** * * @@ -940,3430 +966,12043 @@ private DeleteProtectionState(int value) { // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Database.DeleteProtectionState) } - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; /** * * *
-   * The resource name of the Database.
-   * Format: `projects/{project}/databases/{database}`
+   * The edition of the database.
    * 
* - * string name = 1; - * - * @return The name. + * Protobuf enum {@code google.firestore.admin.v1.Database.DatabaseEdition} */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; + public enum DatabaseEdition implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not used.
+     * 
+ * + * DATABASE_EDITION_UNSPECIFIED = 0; + */ + DATABASE_EDITION_UNSPECIFIED(0), + /** + * + * + *
+     * Standard edition.
+     *
+     * This is the default setting if not specified.
+     * 
+ * + * STANDARD = 1; + */ + STANDARD(1), + /** + * + * + *
+     * Enterprise edition.
+     * 
+ * + * ENTERPRISE = 2; + */ + ENTERPRISE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not used.
+     * 
+ * + * DATABASE_EDITION_UNSPECIFIED = 0; + */ + public static final int DATABASE_EDITION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Standard edition.
+     *
+     * This is the default setting if not specified.
+     * 
+ * + * STANDARD = 1; + */ + public static final int STANDARD_VALUE = 1; + + /** + * + * + *
+     * Enterprise edition.
+     * 
+ * + * ENTERPRISE = 2; + */ + public static final int ENTERPRISE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; } - } - /** - * - * - *
-   * The resource name of the Database.
-   * Format: `projects/{project}/databases/{database}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DatabaseEdition valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DatabaseEdition forNumber(int value) { + switch (value) { + case 0: + return DATABASE_EDITION_UNSPECIFIED; + case 1: + return STANDARD; + case 2: + return ENTERPRISE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseEdition findValueByNumber(int number) { + return DatabaseEdition.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.Database.getDescriptor().getEnumTypes().get(5); + } + + private static final DatabaseEdition[] VALUES = values(); + + public static DatabaseEdition valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatabaseEdition(int value) { + this.value = value; } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Database.DatabaseEdition) } - public static final int UID_FIELD_NUMBER = 3; + public interface CmekConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Database.CmekConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Only keys in the same location as this database are allowed to
+     * be used for encryption.
+     *
+     * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+     * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+     * Cloud KMS multi-region europe. See
+     * https://cloud.google.com/kms/docs/locations.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + + /** + * + * + *
+     * Required. Only keys in the same location as this database are allowed to
+     * be used for encryption.
+     *
+     * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+     * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+     * Cloud KMS multi-region europe. See
+     * https://cloud.google.com/kms/docs/locations.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the activeKeyVersion. + */ + java.util.List getActiveKeyVersionList(); + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of activeKeyVersion. + */ + int getActiveKeyVersionCount(); + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The activeKeyVersion at the given index. + */ + java.lang.String getActiveKeyVersion(int index); + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the activeKeyVersion at the given index. + */ + com.google.protobuf.ByteString getActiveKeyVersionBytes(int index); + } - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; /** * * *
-   * Output only. The system-generated UUID4 for this Database.
+   * The CMEK (Customer Managed Encryption Key) configuration for a Firestore
+   * database. If not present, the database is secured by the default Google
+   * encryption key.
    * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. + * Protobuf type {@code google.firestore.admin.v1.Database.CmekConfig} */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; + public static final class CmekConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database.CmekConfig) + CmekConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CmekConfig.newBuilder() to construct. + private CmekConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - /** - * - * - *
-   * Output only. The system-generated UUID4 for this Database.
-   * 
- * - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + private CmekConfig() { + kmsKeyName_ = ""; + activeKeyVersion_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - } - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The timestamp at which this database was created. Databases
-   * created before 2016 do not populate create_time.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Output only. The timestamp at which this database was created. Databases
-   * created before 2016 do not populate create_time.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The timestamp at which this database was created. Databases
-   * created before 2016 do not populate create_time.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CmekConfig(); + } - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The timestamp at which this database was most recently
-   * updated. Note this only includes updates to the database resource and not
-   * data contained by the database.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Output only. The timestamp at which this database was most recently
-   * updated. Note this only includes updates to the database resource and not
-   * data contained by the database.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The timestamp at which this database was most recently
-   * updated. Note this only includes updates to the database resource and not
-   * data contained by the database.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_CmekConfig_descriptor; + } - public static final int LOCATION_ID_FIELD_NUMBER = 9; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_CmekConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.CmekConfig.class, + com.google.firestore.admin.v1.Database.CmekConfig.Builder.class); + } - @SuppressWarnings("serial") - private volatile java.lang.Object locationId_ = ""; - /** - * - * - *
-   * The location of the database. Available locations are listed at
-   * https://cloud.google.com/firestore/docs/locations.
-   * 
- * - * string location_id = 9; - * - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; + public static final int KMS_KEY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
+     * Required. Only keys in the same location as this database are allowed to
+     * be used for encryption.
+     *
+     * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+     * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+     * Cloud KMS multi-region europe. See
+     * https://cloud.google.com/kms/docs/locations.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } } - } - /** - * - * - *
-   * The location of the database. Available locations are listed at
-   * https://cloud.google.com/firestore/docs/locations.
-   * 
- * - * string location_id = 9; - * - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + /** + * + * + *
+     * Required. Only keys in the same location as this database are allowed to
+     * be used for encryption.
+     *
+     * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+     * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+     * Cloud KMS multi-region europe. See
+     * https://cloud.google.com/kms/docs/locations.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - } - public static final int TYPE_FIELD_NUMBER = 10; - private int type_ = 0; - /** - * - * - *
-   * The type of the database.
-   * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
-   * information about how to choose.
-   * 
- * - * .google.firestore.admin.v1.Database.DatabaseType type = 10; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * + public static final int ACTIVE_KEY_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList activeKeyVersion_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the activeKeyVersion. + */ + public com.google.protobuf.ProtocolStringList getActiveKeyVersionList() { + return activeKeyVersion_; + } + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of activeKeyVersion. + */ + public int getActiveKeyVersionCount() { + return activeKeyVersion_.size(); + } + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The activeKeyVersion at the given index. + */ + public java.lang.String getActiveKeyVersion(int index) { + return activeKeyVersion_.get(index); + } + + /** + * + * + *
+     * Output only. Currently in-use [KMS key
+     * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+     * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+     * there can be multiple in-use key versions.
+     *
+     * The expected format is
+     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+     * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the activeKeyVersion at the given index. + */ + public com.google.protobuf.ByteString getActiveKeyVersionBytes(int index) { + return activeKeyVersion_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_); + } + for (int i = 0; i < activeKeyVersion_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, activeKeyVersion_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_); + } + { + int dataSize = 0; + for (int i = 0; i < activeKeyVersion_.size(); i++) { + dataSize += computeStringSizeNoTag(activeKeyVersion_.getRaw(i)); + } + size += dataSize; + size += 1 * getActiveKeyVersionList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.Database.CmekConfig)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database.CmekConfig other = + (com.google.firestore.admin.v1.Database.CmekConfig) obj; + + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (!getActiveKeyVersionList().equals(other.getActiveKeyVersionList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + if (getActiveKeyVersionCount() > 0) { + hash = (37 * hash) + ACTIVE_KEY_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getActiveKeyVersionList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.Database.CmekConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The CMEK (Customer Managed Encryption Key) configuration for a Firestore
+     * database. If not present, the database is secured by the default Google
+     * encryption key.
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Database.CmekConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database.CmekConfig) + com.google.firestore.admin.v1.Database.CmekConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_CmekConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_CmekConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.CmekConfig.class, + com.google.firestore.admin.v1.Database.CmekConfig.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Database.CmekConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKeyName_ = ""; + activeKeyVersion_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_CmekConfig_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.CmekConfig getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.CmekConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.CmekConfig build() { + com.google.firestore.admin.v1.Database.CmekConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.CmekConfig buildPartial() { + com.google.firestore.admin.v1.Database.CmekConfig result = + new com.google.firestore.admin.v1.Database.CmekConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.Database.CmekConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKeyName_ = kmsKeyName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + activeKeyVersion_.makeImmutable(); + result.activeKeyVersion_ = activeKeyVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Database.CmekConfig) { + return mergeFrom((com.google.firestore.admin.v1.Database.CmekConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Database.CmekConfig other) { + if (other == com.google.firestore.admin.v1.Database.CmekConfig.getDefaultInstance()) + return this; + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.activeKeyVersion_.isEmpty()) { + if (activeKeyVersion_.isEmpty()) { + activeKeyVersion_ = other.activeKeyVersion_; + bitField0_ |= 0x00000002; + } else { + ensureActiveKeyVersionIsMutable(); + activeKeyVersion_.addAll(other.activeKeyVersion_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + kmsKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureActiveKeyVersionIsMutable(); + activeKeyVersion_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
+       * Required. Only keys in the same location as this database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. Only keys in the same location as this database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. Only keys in the same location as this database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Only keys in the same location as this database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Only keys in the same location as this database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList activeKeyVersion_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureActiveKeyVersionIsMutable() { + if (!activeKeyVersion_.isModifiable()) { + activeKeyVersion_ = new com.google.protobuf.LazyStringArrayList(activeKeyVersion_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the activeKeyVersion. + */ + public com.google.protobuf.ProtocolStringList getActiveKeyVersionList() { + activeKeyVersion_.makeImmutable(); + return activeKeyVersion_; + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of activeKeyVersion. + */ + public int getActiveKeyVersionCount() { + return activeKeyVersion_.size(); + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The activeKeyVersion at the given index. + */ + public java.lang.String getActiveKeyVersion(int index) { + return activeKeyVersion_.get(index); + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the activeKeyVersion at the given index. + */ + public com.google.protobuf.ByteString getActiveKeyVersionBytes(int index) { + return activeKeyVersion_.getByteString(index); + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The activeKeyVersion to set. + * @return This builder for chaining. + */ + public Builder setActiveKeyVersion(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveKeyVersionIsMutable(); + activeKeyVersion_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The activeKeyVersion to add. + * @return This builder for chaining. + */ + public Builder addActiveKeyVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveKeyVersionIsMutable(); + activeKeyVersion_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The activeKeyVersion to add. + * @return This builder for chaining. + */ + public Builder addAllActiveKeyVersion(java.lang.Iterable values) { + ensureActiveKeyVersionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, activeKeyVersion_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearActiveKeyVersion() { + activeKeyVersion_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Currently in-use [KMS key
+       * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
+       * During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
+       * there can be multiple in-use key versions.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
+       * 
+ * + * repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the activeKeyVersion to add. + * @return This builder for chaining. + */ + public Builder addActiveKeyVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureActiveKeyVersionIsMutable(); + activeKeyVersion_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Database.CmekConfig) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Database.CmekConfig) + private static final com.google.firestore.admin.v1.Database.CmekConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Database.CmekConfig(); + } + + public static com.google.firestore.admin.v1.Database.CmekConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CmekConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.CmekConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SourceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Database.SourceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If set, this database was restored from the specified backup (or a
+     * snapshot thereof).
+     * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * + * @return Whether the backup field is set. + */ + boolean hasBackup(); + + /** + * + * + *
+     * If set, this database was restored from the specified backup (or a
+     * snapshot thereof).
+     * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * + * @return The backup. + */ + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource getBackup(); + + /** + * + * + *
+     * If set, this database was restored from the specified backup (or a
+     * snapshot thereof).
+     * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + com.google.firestore.admin.v1.Database.SourceInfo.BackupSourceOrBuilder getBackupOrBuilder(); + + /** + * + * + *
+     * The associated long-running operation. This field may not be set after
+     * the operation has completed. Format:
+     * `projects/{project}/databases/{database}/operations/{operation}`.
+     * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @return The operation. + */ + java.lang.String getOperation(); + + /** + * + * + *
+     * The associated long-running operation. This field may not be set after
+     * the operation has completed. Format:
+     * `projects/{project}/databases/{database}/operations/{operation}`.
+     * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for operation. + */ + com.google.protobuf.ByteString getOperationBytes(); + + com.google.firestore.admin.v1.Database.SourceInfo.SourceCase getSourceCase(); + } + + /** + * + * + *
+   * Information about the provenance of this database.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Database.SourceInfo} + */ + public static final class SourceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database.SourceInfo) + SourceInfoOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SourceInfo.newBuilder() to construct. + private SourceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SourceInfo() { + operation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SourceInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.SourceInfo.class, + com.google.firestore.admin.v1.Database.SourceInfo.Builder.class); + } + + public interface BackupSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Database.SourceInfo.BackupSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The resource name of the backup that was used to restore this
+       * database. Format:
+       * `projects/{project}/locations/{location}/backups/{backup}`.
+       * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backup. + */ + java.lang.String getBackup(); + + /** + * + * + *
+       * The resource name of the backup that was used to restore this
+       * database. Format:
+       * `projects/{project}/locations/{location}/backups/{backup}`.
+       * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backup. + */ + com.google.protobuf.ByteString getBackupBytes(); + } + + /** + * + * + *
+     * Information about a backup that was used to restore a database.
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Database.SourceInfo.BackupSource} + */ + public static final class BackupSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database.SourceInfo.BackupSource) + BackupSourceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use BackupSource.newBuilder() to construct. + private BackupSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BackupSource() { + backup_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BackupSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.class, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.Builder.class); + } + + public static final int BACKUP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object backup_ = ""; + + /** + * + * + *
+       * The resource name of the backup that was used to restore this
+       * database. Format:
+       * `projects/{project}/locations/{location}/backups/{backup}`.
+       * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backup. + */ + @java.lang.Override + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } + } + + /** + * + * + *
+       * The resource name of the backup that was used to restore this
+       * database. Format:
+       * `projects/{project}/locations/{location}/backups/{backup}`.
+       * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, backup_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, backup_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.Database.SourceInfo.BackupSource)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource other = + (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) obj; + + if (!getBackup().equals(other.getBackup())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * Information about a backup that was used to restore a database.
+       * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Database.SourceInfo.BackupSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database.SourceInfo.BackupSource) + com.google.firestore.admin.v1.Database.SourceInfo.BackupSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.class, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.Builder.class); + } + + // Construct using + // com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backup_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSource build() { + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSource buildPartial() { + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource result = + new com.google.firestore.admin.v1.Database.SourceInfo.BackupSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backup_ = backup_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) { + return mergeFrom( + (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource other) { + if (other + == com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + .getDefaultInstance()) return this; + if (!other.getBackup().isEmpty()) { + backup_ = other.backup_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + backup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object backup_ = ""; + + /** + * + * + *
+         * The resource name of the backup that was used to restore this
+         * database. Format:
+         * `projects/{project}/locations/{location}/backups/{backup}`.
+         * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backup. + */ + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * The resource name of the backup that was used to restore this
+         * database. Format:
+         * `projects/{project}/locations/{location}/backups/{backup}`.
+         * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backup. + */ + public com.google.protobuf.ByteString getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * The resource name of the backup that was used to restore this
+         * database. Format:
+         * `projects/{project}/locations/{location}/backups/{backup}`.
+         * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The backup to set. + * @return This builder for chaining. + */ + public Builder setBackup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * The resource name of the backup that was used to restore this
+         * database. Format:
+         * `projects/{project}/locations/{location}/backups/{backup}`.
+         * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBackup() { + backup_ = getDefaultInstance().getBackup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * The resource name of the backup that was used to restore this
+         * database. Format:
+         * `projects/{project}/locations/{location}/backups/{backup}`.
+         * 
+ * + * string backup = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for backup to set. + * @return This builder for chaining. + */ + public Builder setBackupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backup_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Database.SourceInfo.BackupSource) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Database.SourceInfo.BackupSource) + private static final com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Database.SourceInfo.BackupSource(); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BACKUP(1), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return BACKUP; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int BACKUP_FIELD_NUMBER = 1; + + /** + * + * + *
+     * If set, this database was restored from the specified backup (or a
+     * snapshot thereof).
+     * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return sourceCase_ == 1; + } + + /** + * + * + *
+     * If set, this database was restored from the specified backup (or a
+     * snapshot thereof).
+     * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * + * @return The backup. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSource getBackup() { + if (sourceCase_ == 1) { + return (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_; + } + return com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.getDefaultInstance(); + } + + /** + * + * + *
+     * If set, this database was restored from the specified backup (or a
+     * snapshot thereof).
+     * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSourceOrBuilder + getBackupOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_; + } + return com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.getDefaultInstance(); + } + + public static final int OPERATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object operation_ = ""; + + /** + * + * + *
+     * The associated long-running operation. This field may not be set after
+     * the operation has completed. Format:
+     * `projects/{project}/databases/{database}/operations/{operation}`.
+     * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @return The operation. + */ + @java.lang.Override + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } + } + + /** + * + * + *
+     * The associated long-running operation. This field may not be set after
+     * the operation has completed. Format:
+     * `projects/{project}/databases/{database}/operations/{operation}`.
+     * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for operation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sourceCase_ == 1) { + output.writeMessage( + 1, (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, operation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, operation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.Database.SourceInfo)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database.SourceInfo other = + (com.google.firestore.admin.v1.Database.SourceInfo) obj; + + if (!getOperation().equals(other.getOperation())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getBackup().equals(other.getBackup())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.Database.SourceInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Information about the provenance of this database.
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Database.SourceInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database.SourceInfo) + com.google.firestore.admin.v1.Database.SourceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.SourceInfo.class, + com.google.firestore.admin.v1.Database.SourceInfo.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Database.SourceInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupBuilder_ != null) { + backupBuilder_.clear(); + } + operation_ = ""; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_SourceInfo_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.SourceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo build() { + com.google.firestore.admin.v1.Database.SourceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo buildPartial() { + com.google.firestore.admin.v1.Database.SourceInfo result = + new com.google.firestore.admin.v1.Database.SourceInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.Database.SourceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operation_ = operation_; + } + } + + private void buildPartialOneofs(com.google.firestore.admin.v1.Database.SourceInfo result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 1 && backupBuilder_ != null) { + result.source_ = backupBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Database.SourceInfo) { + return mergeFrom((com.google.firestore.admin.v1.Database.SourceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Database.SourceInfo other) { + if (other == com.google.firestore.admin.v1.Database.SourceInfo.getDefaultInstance()) + return this; + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getSourceCase()) { + case BACKUP: + { + mergeBackup(other.getBackup()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 26: + { + operation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.Builder, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSourceOrBuilder> + backupBuilder_; + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return sourceCase_ == 1; + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * + * @return The backup. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSource getBackup() { + if (backupBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_; + } + return com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + .getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return backupBuilder_.getMessage(); + } + return com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + public Builder setBackup( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + backupBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + public Builder setBackup( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.Builder builderForValue) { + if (backupBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + public Builder mergeBackup( + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource value) { + if (backupBuilder_ == null) { + if (sourceCase_ == 1 + && source_ + != com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + .getDefaultInstance()) { + source_ = + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.newBuilder( + (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + backupBuilder_.mergeFrom(value); + } else { + backupBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + public Builder clearBackup() { + if (backupBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + backupBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.Builder + getBackupBuilder() { + return getBackupFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo.BackupSourceOrBuilder + getBackupOrBuilder() { + if ((sourceCase_ == 1) && (backupBuilder_ != null)) { + return backupBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_; + } + return com.google.firestore.admin.v1.Database.SourceInfo.BackupSource + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * If set, this database was restored from the specified backup (or a
+       * snapshot thereof).
+       * 
+ * + * .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.Builder, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSourceOrBuilder> + getBackupFieldBuilder() { + if (backupBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.getDefaultInstance(); + } + backupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSource.Builder, + com.google.firestore.admin.v1.Database.SourceInfo.BackupSourceOrBuilder>( + (com.google.firestore.admin.v1.Database.SourceInfo.BackupSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged(); + return backupBuilder_; + } + + private java.lang.Object operation_ = ""; + + /** + * + * + *
+       * The associated long-running operation. This field may not be set after
+       * the operation has completed. Format:
+       * `projects/{project}/databases/{database}/operations/{operation}`.
+       * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @return The operation. + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The associated long-running operation. This field may not be set after
+       * the operation has completed. Format:
+       * `projects/{project}/databases/{database}/operations/{operation}`.
+       * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for operation. + */ + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The associated long-running operation. This field may not be set after
+       * the operation has completed. Format:
+       * `projects/{project}/databases/{database}/operations/{operation}`.
+       * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The associated long-running operation. This field may not be set after
+       * the operation has completed. Format:
+       * `projects/{project}/databases/{database}/operations/{operation}`.
+       * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearOperation() { + operation_ = getDefaultInstance().getOperation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * The associated long-running operation. This field may not be set after
+       * the operation has completed. Format:
+       * `projects/{project}/databases/{database}/operations/{operation}`.
+       * 
+ * + * string operation = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for operation to set. + * @return This builder for chaining. + */ + public Builder setOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Database.SourceInfo) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Database.SourceInfo) + private static final com.google.firestore.admin.v1.Database.SourceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Database.SourceInfo(); + } + + public static com.google.firestore.admin.v1.Database.SourceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SourceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Database.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + * + * @return Whether the googleDefaultEncryption field is set. + */ + boolean hasGoogleDefaultEncryption(); + + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + * + * @return The googleDefaultEncryption. + */ + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + getGoogleDefaultEncryption(); + + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsOrBuilder + getGoogleDefaultEncryptionOrBuilder(); + + /** + * + * + *
+     * The database will use the same encryption configuration as the source.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + * + * @return Whether the useSourceEncryption field is set. + */ + boolean hasUseSourceEncryption(); + + /** + * + * + *
+     * The database will use the same encryption configuration as the source.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + * + * @return The useSourceEncryption. + */ + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + getUseSourceEncryption(); + + /** + * + * + *
+     * The database will use the same encryption configuration as the source.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsOrBuilder + getUseSourceEncryptionOrBuilder(); + + /** + * + * + *
+     * Use Customer Managed Encryption Keys (CMEK) for encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + * + * @return Whether the customerManagedEncryption field is set. + */ + boolean hasCustomerManagedEncryption(); + + /** + * + * + *
+     * Use Customer Managed Encryption Keys (CMEK) for encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + * + * @return The customerManagedEncryption. + */ + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + getCustomerManagedEncryption(); + + /** + * + * + *
+     * Use Customer Managed Encryption Keys (CMEK) for encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptionsOrBuilder + getCustomerManagedEncryptionOrBuilder(); + + com.google.firestore.admin.v1.Database.EncryptionConfig.EncryptionTypeCase + getEncryptionTypeCase(); + } + + /** + * + * + *
+   * Encryption configuration for a new database being created from another
+   * source.
+   *
+   * The source could be a [Backup][google.firestore.admin.v1.Backup] .
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Database.EncryptionConfig} + */ + public static final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database.EncryptionConfig) + EncryptionConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use EncryptionConfig.newBuilder() to construct. + private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EncryptionConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EncryptionConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig.class, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder.class); + } + + public interface GoogleDefaultEncryptionOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
+     * The configuration options for using Google default encryption.
+     * 
+ * + * Protobuf type {@code + * google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions} + */ + public static final class GoogleDefaultEncryptionOptions + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions) + GoogleDefaultEncryptionOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GoogleDefaultEncryptionOptions.newBuilder() to construct. + private GoogleDefaultEncryptionOptions( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoogleDefaultEncryptionOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoogleDefaultEncryptionOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.class, + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + other = + (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * The configuration options for using Google default encryption.
+       * 
+ * + * Protobuf type {@code + * google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions) + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.class, + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.Builder.class); + } + + // Construct using + // com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + build() { + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + buildPartial() { + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + result = + new com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) { + return mergeFrom( + (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + other) { + if (other + == com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions) + private static final com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions(); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleDefaultEncryptionOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SourceEncryptionOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
+     * The configuration options for using the same encryption method as the
+     * source.
+     * 
+ * + * Protobuf type {@code + * google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions} + */ + public static final class SourceEncryptionOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + SourceEncryptionOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SourceEncryptionOptions.newBuilder() to construct. + private SourceEncryptionOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SourceEncryptionOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SourceEncryptionOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .class, + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions other = + (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * The configuration options for using the same encryption method as the
+       * source.
+       * 
+ * + * Protobuf type {@code + * google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .class, + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .Builder.class); + } + + // Construct using + // com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + build() { + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + buildPartial() { + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions result = + new com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions( + this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) { + return mergeFrom( + (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions other) { + if (other + == com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + private static final com.google.firestore.admin.v1.Database.EncryptionConfig + .SourceEncryptionOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions(); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SourceEncryptionOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CustomerManagedEncryptionOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Only keys in the same location as the database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + + /** + * + * + *
+       * Required. Only keys in the same location as the database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + } + + /** + * + * + *
+     * The configuration options for using CMEK (Customer Managed Encryption
+     * Key) encryption.
+     * 
+ * + * Protobuf type {@code + * google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions} + */ + public static final class CustomerManagedEncryptionOptions + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions) + CustomerManagedEncryptionOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CustomerManagedEncryptionOptions.newBuilder() to construct. + private CustomerManagedEncryptionOptions( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomerManagedEncryptionOptions() { + kmsKeyName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomerManagedEncryptionOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.class, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.Builder.class); + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
+       * Required. Only keys in the same location as the database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. Only keys in the same location as the database are allowed to
+       * be used for encryption.
+       *
+       * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+       * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+       * Cloud KMS multi-region europe. See
+       * https://cloud.google.com/kms/docs/locations.
+       *
+       * The expected format is
+       * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+       * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + other = + (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + obj; + + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * The configuration options for using CMEK (Customer Managed Encryption
+       * Key) encryption.
+       * 
+ * + * Protobuf type {@code + * google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions) + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.class, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.Builder.class); + } + + // Construct using + // com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKeyName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + build() { + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + buildPartial() { + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + result = + new com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKeyName_ = kmsKeyName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) { + return mergeFrom( + (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + other) { + if (other + == com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance()) return this; + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + kmsKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
+         * Required. Only keys in the same location as the database are allowed to
+         * be used for encryption.
+         *
+         * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+         * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+         * Cloud KMS multi-region europe. See
+         * https://cloud.google.com/kms/docs/locations.
+         *
+         * The expected format is
+         * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+         * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. Only keys in the same location as the database are allowed to
+         * be used for encryption.
+         *
+         * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+         * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+         * Cloud KMS multi-region europe. See
+         * https://cloud.google.com/kms/docs/locations.
+         *
+         * The expected format is
+         * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+         * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. Only keys in the same location as the database are allowed to
+         * be used for encryption.
+         *
+         * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+         * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+         * Cloud KMS multi-region europe. See
+         * https://cloud.google.com/kms/docs/locations.
+         *
+         * The expected format is
+         * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+         * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. Only keys in the same location as the database are allowed to
+         * be used for encryption.
+         *
+         * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+         * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+         * Cloud KMS multi-region europe. See
+         * https://cloud.google.com/kms/docs/locations.
+         *
+         * The expected format is
+         * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+         * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. Only keys in the same location as the database are allowed to
+         * be used for encryption.
+         *
+         * For Firestore's nam5 multi-region, this corresponds to Cloud KMS
+         * multi-region us. For Firestore's eur3 multi-region, this corresponds to
+         * Cloud KMS multi-region europe. See
+         * https://cloud.google.com/kms/docs/locations.
+         *
+         * The expected format is
+         * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
+         * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions) + private static final com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions(); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomerManagedEncryptionOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int encryptionTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object encryptionType_; + + public enum EncryptionTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GOOGLE_DEFAULT_ENCRYPTION(1), + USE_SOURCE_ENCRYPTION(2), + CUSTOMER_MANAGED_ENCRYPTION(3), + ENCRYPTIONTYPE_NOT_SET(0); + private final int value; + + private EncryptionTypeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EncryptionTypeCase valueOf(int value) { + return forNumber(value); + } + + public static EncryptionTypeCase forNumber(int value) { + switch (value) { + case 1: + return GOOGLE_DEFAULT_ENCRYPTION; + case 2: + return USE_SOURCE_ENCRYPTION; + case 3: + return CUSTOMER_MANAGED_ENCRYPTION; + case 0: + return ENCRYPTIONTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EncryptionTypeCase getEncryptionTypeCase() { + return EncryptionTypeCase.forNumber(encryptionTypeCase_); + } + + public static final int GOOGLE_DEFAULT_ENCRYPTION_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + * + * @return Whether the googleDefaultEncryption field is set. + */ + @java.lang.Override + public boolean hasGoogleDefaultEncryption() { + return encryptionTypeCase_ == 1; + } + + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + * + * @return The googleDefaultEncryption. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + getGoogleDefaultEncryption() { + if (encryptionTypeCase_ == 1) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + .getDefaultInstance(); + } + + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptionsOrBuilder + getGoogleDefaultEncryptionOrBuilder() { + if (encryptionTypeCase_ == 1) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + .getDefaultInstance(); + } + + public static final int USE_SOURCE_ENCRYPTION_FIELD_NUMBER = 2; + + /** + * + * + *
+     * The database will use the same encryption configuration as the source.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + * + * @return Whether the useSourceEncryption field is set. + */ + @java.lang.Override + public boolean hasUseSourceEncryption() { + return encryptionTypeCase_ == 2; + } + + /** + * + * + *
+     * The database will use the same encryption configuration as the source.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + * + * @return The useSourceEncryption. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + getUseSourceEncryption() { + if (encryptionTypeCase_ == 2) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance(); + } + + /** + * + * + *
+     * The database will use the same encryption configuration as the source.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsOrBuilder + getUseSourceEncryptionOrBuilder() { + if (encryptionTypeCase_ == 2) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance(); + } + + public static final int CUSTOMER_MANAGED_ENCRYPTION_FIELD_NUMBER = 3; + + /** + * + * + *
+     * Use Customer Managed Encryption Keys (CMEK) for encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + * + * @return Whether the customerManagedEncryption field is set. + */ + @java.lang.Override + public boolean hasCustomerManagedEncryption() { + return encryptionTypeCase_ == 3; + } + + /** + * + * + *
+     * Use Customer Managed Encryption Keys (CMEK) for encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + * + * @return The customerManagedEncryption. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + getCustomerManagedEncryption() { + if (encryptionTypeCase_ == 3) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance(); + } + + /** + * + * + *
+     * Use Customer Managed Encryption Keys (CMEK) for encryption.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptionsOrBuilder + getCustomerManagedEncryptionOrBuilder() { + if (encryptionTypeCase_ == 3) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encryptionTypeCase_ == 1) { + output.writeMessage( + 1, + (com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions) + encryptionType_); + } + if (encryptionTypeCase_ == 2) { + output.writeMessage( + 2, + (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + encryptionType_); + } + if (encryptionTypeCase_ == 3) { + output.writeMessage( + 3, + (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encryptionTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + encryptionType_); + } + if (encryptionTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + encryptionType_); + } + if (encryptionTypeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.Database.EncryptionConfig)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database.EncryptionConfig other = + (com.google.firestore.admin.v1.Database.EncryptionConfig) obj; + + if (!getEncryptionTypeCase().equals(other.getEncryptionTypeCase())) return false; + switch (encryptionTypeCase_) { + case 1: + if (!getGoogleDefaultEncryption().equals(other.getGoogleDefaultEncryption())) + return false; + break; + case 2: + if (!getUseSourceEncryption().equals(other.getUseSourceEncryption())) return false; + break; + case 3: + if (!getCustomerManagedEncryption().equals(other.getCustomerManagedEncryption())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (encryptionTypeCase_) { + case 1: + hash = (37 * hash) + GOOGLE_DEFAULT_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getGoogleDefaultEncryption().hashCode(); + break; + case 2: + hash = (37 * hash) + USE_SOURCE_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getUseSourceEncryption().hashCode(); + break; + case 3: + hash = (37 * hash) + CUSTOMER_MANAGED_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getCustomerManagedEncryption().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.Database.EncryptionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Encryption configuration for a new database being created from another
+     * source.
+     *
+     * The source could be a [Backup][google.firestore.admin.v1.Backup] .
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Database.EncryptionConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database.EncryptionConfig) + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.EncryptionConfig.class, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Database.EncryptionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (googleDefaultEncryptionBuilder_ != null) { + googleDefaultEncryptionBuilder_.clear(); + } + if (useSourceEncryptionBuilder_ != null) { + useSourceEncryptionBuilder_.clear(); + } + if (customerManagedEncryptionBuilder_ != null) { + customerManagedEncryptionBuilder_.clear(); + } + encryptionTypeCase_ = 0; + encryptionType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig build() { + com.google.firestore.admin.v1.Database.EncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig buildPartial() { + com.google.firestore.admin.v1.Database.EncryptionConfig result = + new com.google.firestore.admin.v1.Database.EncryptionConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.Database.EncryptionConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.firestore.admin.v1.Database.EncryptionConfig result) { + result.encryptionTypeCase_ = encryptionTypeCase_; + result.encryptionType_ = this.encryptionType_; + if (encryptionTypeCase_ == 1 && googleDefaultEncryptionBuilder_ != null) { + result.encryptionType_ = googleDefaultEncryptionBuilder_.build(); + } + if (encryptionTypeCase_ == 2 && useSourceEncryptionBuilder_ != null) { + result.encryptionType_ = useSourceEncryptionBuilder_.build(); + } + if (encryptionTypeCase_ == 3 && customerManagedEncryptionBuilder_ != null) { + result.encryptionType_ = customerManagedEncryptionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Database.EncryptionConfig) { + return mergeFrom((com.google.firestore.admin.v1.Database.EncryptionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Database.EncryptionConfig other) { + if (other == com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance()) + return this; + switch (other.getEncryptionTypeCase()) { + case GOOGLE_DEFAULT_ENCRYPTION: + { + mergeGoogleDefaultEncryption(other.getGoogleDefaultEncryption()); + break; + } + case USE_SOURCE_ENCRYPTION: + { + mergeUseSourceEncryption(other.getUseSourceEncryption()); + break; + } + case CUSTOMER_MANAGED_ENCRYPTION: + { + mergeCustomerManagedEncryption(other.getCustomerManagedEncryption()); + break; + } + case ENCRYPTIONTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getGoogleDefaultEncryptionFieldBuilder().getBuilder(), extensionRegistry); + encryptionTypeCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getUseSourceEncryptionFieldBuilder().getBuilder(), extensionRegistry); + encryptionTypeCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getCustomerManagedEncryptionFieldBuilder().getBuilder(), extensionRegistry); + encryptionTypeCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int encryptionTypeCase_ = 0; + private java.lang.Object encryptionType_; + + public EncryptionTypeCase getEncryptionTypeCase() { + return EncryptionTypeCase.forNumber(encryptionTypeCase_); + } + + public Builder clearEncryptionType() { + encryptionTypeCase_ = 0; + encryptionType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + .Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptionsOrBuilder> + googleDefaultEncryptionBuilder_; + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + * + * @return Whether the googleDefaultEncryption field is set. + */ + @java.lang.Override + public boolean hasGoogleDefaultEncryption() { + return encryptionTypeCase_ == 1; + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + * + * @return The googleDefaultEncryption. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + getGoogleDefaultEncryption() { + if (googleDefaultEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 1) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.getDefaultInstance(); + } else { + if (encryptionTypeCase_ == 1) { + return googleDefaultEncryptionBuilder_.getMessage(); + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + public Builder setGoogleDefaultEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + value) { + if (googleDefaultEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionType_ = value; + onChanged(); + } else { + googleDefaultEncryptionBuilder_.setMessage(value); + } + encryptionTypeCase_ = 1; + return this; + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + public Builder setGoogleDefaultEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + .Builder + builderForValue) { + if (googleDefaultEncryptionBuilder_ == null) { + encryptionType_ = builderForValue.build(); + onChanged(); + } else { + googleDefaultEncryptionBuilder_.setMessage(builderForValue.build()); + } + encryptionTypeCase_ = 1; + return this; + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + public Builder mergeGoogleDefaultEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + value) { + if (googleDefaultEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 1 + && encryptionType_ + != com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.getDefaultInstance()) { + encryptionType_ = + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.newBuilder( + (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + encryptionType_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionType_ = value; + } + onChanged(); + } else { + if (encryptionTypeCase_ == 1) { + googleDefaultEncryptionBuilder_.mergeFrom(value); + } else { + googleDefaultEncryptionBuilder_.setMessage(value); + } + } + encryptionTypeCase_ = 1; + return this; + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + public Builder clearGoogleDefaultEncryption() { + if (googleDefaultEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 1) { + encryptionTypeCase_ = 0; + encryptionType_ = null; + onChanged(); + } + } else { + if (encryptionTypeCase_ == 1) { + encryptionTypeCase_ = 0; + encryptionType_ = null; + } + googleDefaultEncryptionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + public com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + .Builder + getGoogleDefaultEncryptionBuilder() { + return getGoogleDefaultEncryptionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptionsOrBuilder + getGoogleDefaultEncryptionOrBuilder() { + if ((encryptionTypeCase_ == 1) && (googleDefaultEncryptionBuilder_ != null)) { + return googleDefaultEncryptionBuilder_.getMessageOrBuilder(); + } else { + if (encryptionTypeCase_ == 1) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+       * Use Google default encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + .Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptionsOrBuilder> + getGoogleDefaultEncryptionFieldBuilder() { + if (googleDefaultEncryptionBuilder_ == null) { + if (!(encryptionTypeCase_ == 1)) { + encryptionType_ = + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.getDefaultInstance(); + } + googleDefaultEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptionsOrBuilder>( + (com.google.firestore.admin.v1.Database.EncryptionConfig + .GoogleDefaultEncryptionOptions) + encryptionType_, + getParentForChildren(), + isClean()); + encryptionType_ = null; + } + encryptionTypeCase_ = 1; + onChanged(); + return googleDefaultEncryptionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .SourceEncryptionOptionsOrBuilder> + useSourceEncryptionBuilder_; + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + * + * @return Whether the useSourceEncryption field is set. + */ + @java.lang.Override + public boolean hasUseSourceEncryption() { + return encryptionTypeCase_ == 2; + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + * + * @return The useSourceEncryption. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + getUseSourceEncryption() { + if (useSourceEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 2) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance(); + } else { + if (encryptionTypeCase_ == 2) { + return useSourceEncryptionBuilder_.getMessage(); + } + return com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + public Builder setUseSourceEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions value) { + if (useSourceEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionType_ = value; + onChanged(); + } else { + useSourceEncryptionBuilder_.setMessage(value); + } + encryptionTypeCase_ = 2; + return this; + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + public Builder setUseSourceEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.Builder + builderForValue) { + if (useSourceEncryptionBuilder_ == null) { + encryptionType_ = builderForValue.build(); + onChanged(); + } else { + useSourceEncryptionBuilder_.setMessage(builderForValue.build()); + } + encryptionTypeCase_ = 2; + return this; + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + public Builder mergeUseSourceEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions value) { + if (useSourceEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 2 + && encryptionType_ + != com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance()) { + encryptionType_ = + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .newBuilder( + (com.google.firestore.admin.v1.Database.EncryptionConfig + .SourceEncryptionOptions) + encryptionType_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionType_ = value; + } + onChanged(); + } else { + if (encryptionTypeCase_ == 2) { + useSourceEncryptionBuilder_.mergeFrom(value); + } else { + useSourceEncryptionBuilder_.setMessage(value); + } + } + encryptionTypeCase_ = 2; + return this; + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + public Builder clearUseSourceEncryption() { + if (useSourceEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 2) { + encryptionTypeCase_ = 0; + encryptionType_ = null; + onChanged(); + } + } else { + if (encryptionTypeCase_ == 2) { + encryptionTypeCase_ = 0; + encryptionType_ = null; + } + useSourceEncryptionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + public com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.Builder + getUseSourceEncryptionBuilder() { + return getUseSourceEncryptionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .SourceEncryptionOptionsOrBuilder + getUseSourceEncryptionOrBuilder() { + if ((encryptionTypeCase_ == 2) && (useSourceEncryptionBuilder_ != null)) { + return useSourceEncryptionBuilder_.getMessageOrBuilder(); + } else { + if (encryptionTypeCase_ == 2) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * The database will use the same encryption configuration as the source.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .SourceEncryptionOptionsOrBuilder> + getUseSourceEncryptionFieldBuilder() { + if (useSourceEncryptionBuilder_ == null) { + if (!(encryptionTypeCase_ == 2)) { + encryptionType_ = + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .getDefaultInstance(); + } + useSourceEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + .Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .SourceEncryptionOptionsOrBuilder>( + (com.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + encryptionType_, + getParentForChildren(), + isClean()); + encryptionType_ = null; + } + encryptionTypeCase_ = 2; + onChanged(); + return useSourceEncryptionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptionsOrBuilder> + customerManagedEncryptionBuilder_; + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + * + * @return Whether the customerManagedEncryption field is set. + */ + @java.lang.Override + public boolean hasCustomerManagedEncryption() { + return encryptionTypeCase_ == 3; + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + * + * @return The customerManagedEncryption. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions + getCustomerManagedEncryption() { + if (customerManagedEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 3) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance(); + } else { + if (encryptionTypeCase_ == 3) { + return customerManagedEncryptionBuilder_.getMessage(); + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + public Builder setCustomerManagedEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + value) { + if (customerManagedEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionType_ = value; + onChanged(); + } else { + customerManagedEncryptionBuilder_.setMessage(value); + } + encryptionTypeCase_ = 3; + return this; + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + public Builder setCustomerManagedEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + .Builder + builderForValue) { + if (customerManagedEncryptionBuilder_ == null) { + encryptionType_ = builderForValue.build(); + onChanged(); + } else { + customerManagedEncryptionBuilder_.setMessage(builderForValue.build()); + } + encryptionTypeCase_ = 3; + return this; + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + public Builder mergeCustomerManagedEncryption( + com.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + value) { + if (customerManagedEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 3 + && encryptionType_ + != com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance()) { + encryptionType_ = + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.newBuilder( + (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionType_ = value; + } + onChanged(); + } else { + if (encryptionTypeCase_ == 3) { + customerManagedEncryptionBuilder_.mergeFrom(value); + } else { + customerManagedEncryptionBuilder_.setMessage(value); + } + } + encryptionTypeCase_ = 3; + return this; + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + public Builder clearCustomerManagedEncryption() { + if (customerManagedEncryptionBuilder_ == null) { + if (encryptionTypeCase_ == 3) { + encryptionTypeCase_ = 0; + encryptionType_ = null; + onChanged(); + } + } else { + if (encryptionTypeCase_ == 3) { + encryptionTypeCase_ = 0; + encryptionType_ = null; + } + customerManagedEncryptionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.Builder + getCustomerManagedEncryptionBuilder() { + return getCustomerManagedEncryptionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptionsOrBuilder + getCustomerManagedEncryptionOrBuilder() { + if ((encryptionTypeCase_ == 3) && (customerManagedEncryptionBuilder_ != null)) { + return customerManagedEncryptionBuilder_.getMessageOrBuilder(); + } else { + if (encryptionTypeCase_ == 3) { + return (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_; + } + return com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+       * Use Customer Managed Encryption Keys (CMEK) for encryption.
+       * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptionsOrBuilder> + getCustomerManagedEncryptionFieldBuilder() { + if (customerManagedEncryptionBuilder_ == null) { + if (!(encryptionTypeCase_ == 3)) { + encryptionType_ = + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.getDefaultInstance(); + } + customerManagedEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptionsOrBuilder>( + (com.google.firestore.admin.v1.Database.EncryptionConfig + .CustomerManagedEncryptionOptions) + encryptionType_, + getParentForChildren(), + isClean()); + encryptionType_ = null; + } + encryptionTypeCase_ = 3; + onChanged(); + return customerManagedEncryptionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Database.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Database.EncryptionConfig) + private static final com.google.firestore.admin.v1.Database.EncryptionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Database.EncryptionConfig(); + } + + public static com.google.firestore.admin.v1.Database.EncryptionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EncryptionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * The resource name of the Database.
+   * Format: `projects/{project}/databases/{database}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * The resource name of the Database.
+   * Format: `projects/{project}/databases/{database}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The system-generated UUID4 for this Database.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The system-generated UUID4 for this Database.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp at which this database was created. Databases
+   * created before 2016 do not populate create_time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp at which this database was created. Databases
+   * created before 2016 do not populate create_time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The timestamp at which this database was created. Databases
+   * created before 2016 do not populate create_time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The timestamp at which this database was most recently
+   * updated. Note this only includes updates to the database resource and not
+   * data contained by the database.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp at which this database was most recently
+   * updated. Note this only includes updates to the database resource and not
+   * data contained by the database.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The timestamp at which this database was most recently
+   * updated. Note this only includes updates to the database resource and not
+   * data contained by the database.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp deleteTime_; + + /** + * + * + *
+   * Output only. The timestamp at which this database was deleted. Only set if
+   * the database has been deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp at which this database was deleted. Only set if
+   * the database has been deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + /** + * + * + *
+   * Output only. The timestamp at which this database was deleted. Only set if
+   * the database has been deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int LOCATION_ID_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object locationId_ = ""; + + /** + * + * + *
+   * The location of the database. Available locations are listed at
+   * https://cloud.google.com/firestore/docs/locations.
+   * 
+ * + * string location_id = 9; + * + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + + /** + * + * + *
+   * The location of the database. Available locations are listed at
+   * https://cloud.google.com/firestore/docs/locations.
+   * 
+ * + * string location_id = 9; + * + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 10; + private int type_ = 0; + + /** + * + * + *
+   * The type of the database.
+   * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
+   * information about how to choose.
+   * 
+ * + * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * The type of the database.
+   * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
+   * information about how to choose.
+   * 
+ * + * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * @return The type. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.DatabaseType getType() { + com.google.firestore.admin.v1.Database.DatabaseType result = + com.google.firestore.admin.v1.Database.DatabaseType.forNumber(type_); + return result == null + ? com.google.firestore.admin.v1.Database.DatabaseType.UNRECOGNIZED + : result; + } + + public static final int CONCURRENCY_MODE_FIELD_NUMBER = 15; + private int concurrencyMode_ = 0; + + /** + * + * + *
+   * The concurrency control mode to use for this database.
+   * 
+ * + * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * @return The enum numeric value on the wire for concurrencyMode. + */ + @java.lang.Override + public int getConcurrencyModeValue() { + return concurrencyMode_; + } + + /** + * + * + *
+   * The concurrency control mode to use for this database.
+   * 
+ * + * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * @return The concurrencyMode. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.ConcurrencyMode getConcurrencyMode() { + com.google.firestore.admin.v1.Database.ConcurrencyMode result = + com.google.firestore.admin.v1.Database.ConcurrencyMode.forNumber(concurrencyMode_); + return result == null + ? com.google.firestore.admin.v1.Database.ConcurrencyMode.UNRECOGNIZED + : result; + } + + public static final int VERSION_RETENTION_PERIOD_FIELD_NUMBER = 17; + private com.google.protobuf.Duration versionRetentionPeriod_; + + /** + * + * + *
+   * Output only. The period during which past versions of data are retained in
+   * the database.
+   *
+   * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+   * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+   * a `read_time` within this window, and will read the state of the database
+   * at that time.
+   *
+   * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+   * the retention period is 1 hour.
+   * 
+ * + * + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the versionRetentionPeriod field is set. + */ + @java.lang.Override + public boolean hasVersionRetentionPeriod() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The period during which past versions of data are retained in
+   * the database.
+   *
+   * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+   * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+   * a `read_time` within this window, and will read the state of the database
+   * at that time.
+   *
+   * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+   * the retention period is 1 hour.
+   * 
+ * + * + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The versionRetentionPeriod. + */ + @java.lang.Override + public com.google.protobuf.Duration getVersionRetentionPeriod() { + return versionRetentionPeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : versionRetentionPeriod_; + } + + /** + * + * + *
+   * Output only. The period during which past versions of data are retained in
+   * the database.
+   *
+   * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+   * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+   * a `read_time` within this window, and will read the state of the database
+   * at that time.
+   *
+   * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+   * the retention period is 1 hour.
+   * 
+ * + * + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getVersionRetentionPeriodOrBuilder() { + return versionRetentionPeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : versionRetentionPeriod_; + } + + public static final int EARLIEST_VERSION_TIME_FIELD_NUMBER = 18; + private com.google.protobuf.Timestamp earliestVersionTime_; + + /** + * + * + *
+   * Output only. The earliest timestamp at which older versions of the data can
+   * be read from the database. See [version_retention_period] above; this field
+   * is populated with `now - version_retention_period`.
+   *
+   * This value is continuously updated, and becomes stale the moment it is
+   * queried. If you are using this value to recover data, make sure to account
+   * for the time from the moment when the value is queried to the moment when
+   * you initiate the recovery.
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the earliestVersionTime field is set. + */ + @java.lang.Override + public boolean hasEarliestVersionTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. The earliest timestamp at which older versions of the data can
+   * be read from the database. See [version_retention_period] above; this field
+   * is populated with `now - version_retention_period`.
+   *
+   * This value is continuously updated, and becomes stale the moment it is
+   * queried. If you are using this value to recover data, make sure to account
+   * for the time from the moment when the value is queried to the moment when
+   * you initiate the recovery.
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The earliestVersionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEarliestVersionTime() { + return earliestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : earliestVersionTime_; + } + + /** + * + * + *
+   * Output only. The earliest timestamp at which older versions of the data can
+   * be read from the database. See [version_retention_period] above; this field
+   * is populated with `now - version_retention_period`.
+   *
+   * This value is continuously updated, and becomes stale the moment it is
+   * queried. If you are using this value to recover data, make sure to account
+   * for the time from the moment when the value is queried to the moment when
+   * you initiate the recovery.
+   * 
+ * + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder() { + return earliestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : earliestVersionTime_; + } + + public static final int POINT_IN_TIME_RECOVERY_ENABLEMENT_FIELD_NUMBER = 21; + private int pointInTimeRecoveryEnablement_ = 0; + + /** + * + * + *
+   * Whether to enable the PITR feature on this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * + * + * @return The enum numeric value on the wire for pointInTimeRecoveryEnablement. + */ + @java.lang.Override + public int getPointInTimeRecoveryEnablementValue() { + return pointInTimeRecoveryEnablement_; + } + + /** + * + * + *
+   * Whether to enable the PITR feature on this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * + * + * @return The pointInTimeRecoveryEnablement. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + getPointInTimeRecoveryEnablement() { + com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement result = + com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.forNumber( + pointInTimeRecoveryEnablement_); + return result == null + ? com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.UNRECOGNIZED + : result; + } + + public static final int APP_ENGINE_INTEGRATION_MODE_FIELD_NUMBER = 19; + private int appEngineIntegrationMode_ = 0; + + /** + * + * + *
+   * The App Engine integration mode to use for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * + * + * @return The enum numeric value on the wire for appEngineIntegrationMode. + */ + @java.lang.Override + public int getAppEngineIntegrationModeValue() { + return appEngineIntegrationMode_; + } + + /** + * + * + *
+   * The App Engine integration mode to use for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * + * + * @return The appEngineIntegrationMode. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.AppEngineIntegrationMode + getAppEngineIntegrationMode() { + com.google.firestore.admin.v1.Database.AppEngineIntegrationMode result = + com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.forNumber( + appEngineIntegrationMode_); + return result == null + ? com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.UNRECOGNIZED + : result; + } + + public static final int KEY_PREFIX_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private volatile java.lang.Object keyPrefix_ = ""; + + /** + * + * + *
+   * Output only. The key_prefix for this database. This key_prefix is used, in
+   * combination with the project ID ("<key prefix>~<project id>") to construct
+   * the application ID that is returned from the Cloud Datastore APIs in Google
+   * App Engine first generation runtimes.
+   *
+   * This value may be empty in which case the appid to use for URL-encoded keys
+   * is the project_id (eg: foo instead of v~foo).
+   * 
+ * + * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The keyPrefix. + */ + @java.lang.Override + public java.lang.String getKeyPrefix() { + java.lang.Object ref = keyPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyPrefix_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The key_prefix for this database. This key_prefix is used, in
+   * combination with the project ID ("<key prefix>~<project id>") to construct
+   * the application ID that is returned from the Cloud Datastore APIs in Google
+   * App Engine first generation runtimes.
+   *
+   * This value may be empty in which case the appid to use for URL-encoded keys
+   * is the project_id (eg: foo instead of v~foo).
+   * 
+ * + * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for keyPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyPrefixBytes() { + java.lang.Object ref = keyPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETE_PROTECTION_STATE_FIELD_NUMBER = 22; + private int deleteProtectionState_ = 0; + + /** + * + * + *
+   * State of delete protection for the database.
+   * 
+ * + * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * + * + * @return The enum numeric value on the wire for deleteProtectionState. + */ + @java.lang.Override + public int getDeleteProtectionStateValue() { + return deleteProtectionState_; + } + + /** + * + * + *
+   * State of delete protection for the database.
+   * 
+ * + * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * + * + * @return The deleteProtectionState. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.DeleteProtectionState getDeleteProtectionState() { + com.google.firestore.admin.v1.Database.DeleteProtectionState result = + com.google.firestore.admin.v1.Database.DeleteProtectionState.forNumber( + deleteProtectionState_); + return result == null + ? com.google.firestore.admin.v1.Database.DeleteProtectionState.UNRECOGNIZED + : result; + } + + public static final int CMEK_CONFIG_FIELD_NUMBER = 23; + private com.google.firestore.admin.v1.Database.CmekConfig cmekConfig_; + + /** + * + * + *
+   * Optional. Presence indicates CMEK is enabled for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cmekConfig field is set. + */ + @java.lang.Override + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Presence indicates CMEK is enabled for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cmekConfig. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.CmekConfig getCmekConfig() { + return cmekConfig_ == null + ? com.google.firestore.admin.v1.Database.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + /** + * + * + *
+   * Optional. Presence indicates CMEK is enabled for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.CmekConfigOrBuilder getCmekConfigOrBuilder() { + return cmekConfig_ == null + ? com.google.firestore.admin.v1.Database.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + public static final int PREVIOUS_ID_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private volatile java.lang.Object previousId_ = ""; + + /** + * + * + *
+   * Output only. The database resource's prior database ID. This field is only
+   * populated for deleted databases.
+   * 
+ * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The previousId. + */ + @java.lang.Override + public java.lang.String getPreviousId() { + java.lang.Object ref = previousId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + previousId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The database resource's prior database ID. This field is only
+   * populated for deleted databases.
+   * 
+ * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for previousId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreviousIdBytes() { + java.lang.Object ref = previousId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + previousId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_INFO_FIELD_NUMBER = 26; + private com.google.firestore.admin.v1.Database.SourceInfo sourceInfo_; + + /** + * + * + *
+   * Output only. Information about the provenance of this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the sourceInfo field is set. + */ + @java.lang.Override + public boolean hasSourceInfo() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Output only. Information about the provenance of this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sourceInfo. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfo getSourceInfo() { + return sourceInfo_ == null + ? com.google.firestore.admin.v1.Database.SourceInfo.getDefaultInstance() + : sourceInfo_; + } + + /** + * + * + *
+   * Output only. Information about the provenance of this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.SourceInfoOrBuilder getSourceInfoOrBuilder() { + return sourceInfo_ == null + ? com.google.firestore.admin.v1.Database.SourceInfo.getDefaultInstance() + : sourceInfo_; + } + + public static final int TAGS_FIELD_NUMBER = 29; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int FREE_TIER_FIELD_NUMBER = 30; + private boolean freeTier_ = false; + + /** + * * *
-   * The type of the database.
-   * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
-   * information about how to choose.
+   * Output only. Background: Free tier is the ability of a Firestore database
+   * to use a small amount of resources every day without being charged. Once
+   * usage exceeds the free tier limit further usage is charged.
+   *
+   * Whether this database can make use of the free tier. Only one database
+   * per project can be eligible for the free tier.
+   *
+   * The first (or next) database that is created in a project without a free
+   * tier database will be marked as eligible for the free tier. Databases that
+   * are created while there is a free tier database will not be eligible for
+   * the free tier.
    * 
* - * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The type. + * @return Whether the freeTier field is set. */ @java.lang.Override - public com.google.firestore.admin.v1.Database.DatabaseType getType() { - com.google.firestore.admin.v1.Database.DatabaseType result = - com.google.firestore.admin.v1.Database.DatabaseType.forNumber(type_); - return result == null - ? com.google.firestore.admin.v1.Database.DatabaseType.UNRECOGNIZED - : result; + public boolean hasFreeTier() { + return ((bitField0_ & 0x00000080) != 0); } - public static final int CONCURRENCY_MODE_FIELD_NUMBER = 15; - private int concurrencyMode_ = 0; /** * * *
-   * The concurrency control mode to use for this database.
+   * Output only. Background: Free tier is the ability of a Firestore database
+   * to use a small amount of resources every day without being charged. Once
+   * usage exceeds the free tier limit further usage is charged.
+   *
+   * Whether this database can make use of the free tier. Only one database
+   * per project can be eligible for the free tier.
+   *
+   * The first (or next) database that is created in a project without a free
+   * tier database will be marked as eligible for the free tier. Databases that
+   * are created while there is a free tier database will not be eligible for
+   * the free tier.
    * 
* - * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The enum numeric value on the wire for concurrencyMode. + * @return The freeTier. */ @java.lang.Override - public int getConcurrencyModeValue() { - return concurrencyMode_; + public boolean getFreeTier() { + return freeTier_; } + + public static final int ETAG_FIELD_NUMBER = 99; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** * * *
-   * The concurrency control mode to use for this database.
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
    * 
* - * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * string etag = 99; * - * @return The concurrencyMode. + * @return The etag. */ @java.lang.Override - public com.google.firestore.admin.v1.Database.ConcurrencyMode getConcurrencyMode() { - com.google.firestore.admin.v1.Database.ConcurrencyMode result = - com.google.firestore.admin.v1.Database.ConcurrencyMode.forNumber(concurrencyMode_); + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 99; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_EDITION_FIELD_NUMBER = 28; + private int databaseEdition_ = 0; + + /** + * + * + *
+   * Immutable. The edition of the database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for databaseEdition. + */ + @java.lang.Override + public int getDatabaseEditionValue() { + return databaseEdition_; + } + + /** + * + * + *
+   * Immutable. The edition of the database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The databaseEdition. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.DatabaseEdition getDatabaseEdition() { + com.google.firestore.admin.v1.Database.DatabaseEdition result = + com.google.firestore.admin.v1.Database.DatabaseEdition.forNumber(databaseEdition_); return result == null - ? com.google.firestore.admin.v1.Database.ConcurrencyMode.UNRECOGNIZED + ? com.google.firestore.admin.v1.Database.DatabaseEdition.UNRECOGNIZED : result; } - public static final int VERSION_RETENTION_PERIOD_FIELD_NUMBER = 17; - private com.google.protobuf.Duration versionRetentionPeriod_; - /** - * - * - *
-   * Output only. The period during which past versions of data are retained in
-   * the database.
-   *
-   * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-   * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-   * a `read_time` within this window, and will read the state of the database
-   * at that time.
-   *
-   * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-   * the retention period is 1 hour.
-   * 
- * - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the versionRetentionPeriod field is set. - */ - @java.lang.Override - public boolean hasVersionRetentionPeriod() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-   * Output only. The period during which past versions of data are retained in
-   * the database.
-   *
-   * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-   * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-   * a `read_time` within this window, and will read the state of the database
-   * at that time.
-   *
-   * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-   * the retention period is 1 hour.
-   * 
- * - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The versionRetentionPeriod. - */ - @java.lang.Override - public com.google.protobuf.Duration getVersionRetentionPeriod() { - return versionRetentionPeriod_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : versionRetentionPeriod_; - } - /** - * - * - *
-   * Output only. The period during which past versions of data are retained in
-   * the database.
-   *
-   * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-   * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-   * a `read_time` within this window, and will read the state of the database
-   * at that time.
-   *
-   * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-   * the retention period is 1 hour.
-   * 
- * - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getDeleteTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, locationId_); + } + if (type_ + != com.google.firestore.admin.v1.Database.DatabaseType.DATABASE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, type_); + } + if (concurrencyMode_ + != com.google.firestore.admin.v1.Database.ConcurrencyMode.CONCURRENCY_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(15, concurrencyMode_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getVersionRetentionPeriod()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getEarliestVersionTime()); + } + if (appEngineIntegrationMode_ + != com.google.firestore.admin.v1.Database.AppEngineIntegrationMode + .APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, appEngineIntegrationMode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPrefix_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, keyPrefix_); + } + if (pointInTimeRecoveryEnablement_ + != com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + .POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(21, pointInTimeRecoveryEnablement_); + } + if (deleteProtectionState_ + != com.google.firestore.admin.v1.Database.DeleteProtectionState + .DELETE_PROTECTION_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(22, deleteProtectionState_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(23, getCmekConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(previousId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, previousId_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(26, getSourceInfo()); + } + if (databaseEdition_ + != com.google.firestore.admin.v1.Database.DatabaseEdition.DATABASE_EDITION_UNSPECIFIED + .getNumber()) { + output.writeEnum(28, databaseEdition_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 29); + if (((bitField0_ & 0x00000080) != 0)) { + output.writeBool(30, freeTier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 99, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDeleteTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, locationId_); + } + if (type_ + != com.google.firestore.admin.v1.Database.DatabaseType.DATABASE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); + } + if (concurrencyMode_ + != com.google.firestore.admin.v1.Database.ConcurrencyMode.CONCURRENCY_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, concurrencyMode_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(17, getVersionRetentionPeriod()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEarliestVersionTime()); + } + if (appEngineIntegrationMode_ + != com.google.firestore.admin.v1.Database.AppEngineIntegrationMode + .APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, appEngineIntegrationMode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPrefix_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, keyPrefix_); + } + if (pointInTimeRecoveryEnablement_ + != com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + .POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(21, pointInTimeRecoveryEnablement_); + } + if (deleteProtectionState_ + != com.google.firestore.admin.v1.Database.DeleteProtectionState + .DELETE_PROTECTION_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, deleteProtectionState_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getCmekConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(previousId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, previousId_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getSourceInfo()); + } + if (databaseEdition_ + != com.google.firestore.admin.v1.Database.DatabaseEdition.DATABASE_EDITION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(28, databaseEdition_); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, tags__); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, freeTier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(99, etag_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + @java.lang.Override - public com.google.protobuf.DurationOrBuilder getVersionRetentionPeriodOrBuilder() { - return versionRetentionPeriod_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : versionRetentionPeriod_; + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.Database)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Database other = (com.google.firestore.admin.v1.Database) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (!getLocationId().equals(other.getLocationId())) return false; + if (type_ != other.type_) return false; + if (concurrencyMode_ != other.concurrencyMode_) return false; + if (hasVersionRetentionPeriod() != other.hasVersionRetentionPeriod()) return false; + if (hasVersionRetentionPeriod()) { + if (!getVersionRetentionPeriod().equals(other.getVersionRetentionPeriod())) return false; + } + if (hasEarliestVersionTime() != other.hasEarliestVersionTime()) return false; + if (hasEarliestVersionTime()) { + if (!getEarliestVersionTime().equals(other.getEarliestVersionTime())) return false; + } + if (pointInTimeRecoveryEnablement_ != other.pointInTimeRecoveryEnablement_) return false; + if (appEngineIntegrationMode_ != other.appEngineIntegrationMode_) return false; + if (!getKeyPrefix().equals(other.getKeyPrefix())) return false; + if (deleteProtectionState_ != other.deleteProtectionState_) return false; + if (hasCmekConfig() != other.hasCmekConfig()) return false; + if (hasCmekConfig()) { + if (!getCmekConfig().equals(other.getCmekConfig())) return false; + } + if (!getPreviousId().equals(other.getPreviousId())) return false; + if (hasSourceInfo() != other.hasSourceInfo()) return false; + if (hasSourceInfo()) { + if (!getSourceInfo().equals(other.getSourceInfo())) return false; + } + if (!internalGetTags().equals(other.internalGetTags())) return false; + if (hasFreeTier() != other.hasFreeTier()) return false; + if (hasFreeTier()) { + if (getFreeTier() != other.getFreeTier()) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (databaseEdition_ != other.databaseEdition_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public static final int EARLIEST_VERSION_TIME_FIELD_NUMBER = 18; - private com.google.protobuf.Timestamp earliestVersionTime_; - /** - * - * - *
-   * Output only. The earliest timestamp at which older versions of the data can
-   * be read from the database. See [version_retention_period] above; this field
-   * is populated with `now - version_retention_period`.
-   *
-   * This value is continuously updated, and becomes stale the moment it is
-   * queried. If you are using this value to recover data, make sure to account
-   * for the time from the moment when the value is queried to the moment when
-   * you initiate the recovery.
-   * 
- * - * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the earliestVersionTime field is set. - */ @java.lang.Override - public boolean hasEarliestVersionTime() { - return ((bitField0_ & 0x00000008) != 0); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CONCURRENCY_MODE_FIELD_NUMBER; + hash = (53 * hash) + concurrencyMode_; + if (hasVersionRetentionPeriod()) { + hash = (37 * hash) + VERSION_RETENTION_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getVersionRetentionPeriod().hashCode(); + } + if (hasEarliestVersionTime()) { + hash = (37 * hash) + EARLIEST_VERSION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEarliestVersionTime().hashCode(); + } + hash = (37 * hash) + POINT_IN_TIME_RECOVERY_ENABLEMENT_FIELD_NUMBER; + hash = (53 * hash) + pointInTimeRecoveryEnablement_; + hash = (37 * hash) + APP_ENGINE_INTEGRATION_MODE_FIELD_NUMBER; + hash = (53 * hash) + appEngineIntegrationMode_; + hash = (37 * hash) + KEY_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getKeyPrefix().hashCode(); + hash = (37 * hash) + DELETE_PROTECTION_STATE_FIELD_NUMBER; + hash = (53 * hash) + deleteProtectionState_; + if (hasCmekConfig()) { + hash = (37 * hash) + CMEK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCmekConfig().hashCode(); + } + hash = (37 * hash) + PREVIOUS_ID_FIELD_NUMBER; + hash = (53 * hash) + getPreviousId().hashCode(); + if (hasSourceInfo()) { + hash = (37 * hash) + SOURCE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getSourceInfo().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } + if (hasFreeTier()) { + hash = (37 * hash) + FREE_TIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFreeTier()); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DATABASE_EDITION_FIELD_NUMBER; + hash = (53 * hash) + databaseEdition_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
-   * Output only. The earliest timestamp at which older versions of the data can
-   * be read from the database. See [version_retention_period] above; this field
-   * is populated with `now - version_retention_period`.
-   *
-   * This value is continuously updated, and becomes stale the moment it is
-   * queried. If you are using this value to recover data, make sure to account
-   * for the time from the moment when the value is queried to the moment when
-   * you initiate the recovery.
-   * 
- * - * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The earliestVersionTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEarliestVersionTime() { - return earliestVersionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : earliestVersionTime_; + + public static com.google.firestore.admin.v1.Database parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
-   * Output only. The earliest timestamp at which older versions of the data can
-   * be read from the database. See [version_retention_period] above; this field
-   * is populated with `now - version_retention_period`.
-   *
-   * This value is continuously updated, and becomes stale the moment it is
-   * queried. If you are using this value to recover data, make sure to account
-   * for the time from the moment when the value is queried to the moment when
-   * you initiate the recovery.
-   * 
- * - * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder() { - return earliestVersionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : earliestVersionTime_; + + public static com.google.firestore.admin.v1.Database parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - public static final int POINT_IN_TIME_RECOVERY_ENABLEMENT_FIELD_NUMBER = 21; - private int pointInTimeRecoveryEnablement_ = 0; - /** - * - * - *
-   * Whether to enable the PITR feature on this database.
-   * 
- * - * - * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * - * - * @return The enum numeric value on the wire for pointInTimeRecoveryEnablement. - */ - @java.lang.Override - public int getPointInTimeRecoveryEnablementValue() { - return pointInTimeRecoveryEnablement_; + public static com.google.firestore.admin.v1.Database parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
-   * Whether to enable the PITR feature on this database.
-   * 
- * - * - * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * - * - * @return The pointInTimeRecoveryEnablement. - */ - @java.lang.Override - public com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - getPointInTimeRecoveryEnablement() { - com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement result = - com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.forNumber( - pointInTimeRecoveryEnablement_); - return result == null - ? com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.UNRECOGNIZED - : result; + + public static com.google.firestore.admin.v1.Database parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - public static final int APP_ENGINE_INTEGRATION_MODE_FIELD_NUMBER = 19; - private int appEngineIntegrationMode_ = 0; - /** - * - * - *
-   * The App Engine integration mode to use for this database.
-   * 
- * - * - * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * - * - * @return The enum numeric value on the wire for appEngineIntegrationMode. - */ - @java.lang.Override - public int getAppEngineIntegrationModeValue() { - return appEngineIntegrationMode_; + public static com.google.firestore.admin.v1.Database parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
-   * The App Engine integration mode to use for this database.
-   * 
- * - * - * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * - * - * @return The appEngineIntegrationMode. - */ - @java.lang.Override - public com.google.firestore.admin.v1.Database.AppEngineIntegrationMode - getAppEngineIntegrationMode() { - com.google.firestore.admin.v1.Database.AppEngineIntegrationMode result = - com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.forNumber( - appEngineIntegrationMode_); - return result == null - ? com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.UNRECOGNIZED - : result; + + public static com.google.firestore.admin.v1.Database parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - public static final int KEY_PREFIX_FIELD_NUMBER = 20; + public static com.google.firestore.admin.v1.Database parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @SuppressWarnings("serial") - private volatile java.lang.Object keyPrefix_ = ""; - /** - * - * - *
-   * Output only. The key_prefix for this database. This key_prefix is used, in
-   * combination with the project id ("<key prefix>~<project id>") to construct
-   * the application id that is returned from the Cloud Datastore APIs in Google
-   * App Engine first generation runtimes.
-   *
-   * This value may be empty in which case the appid to use for URL-encoded keys
-   * is the project_id (eg: foo instead of v~foo).
-   * 
- * - * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The keyPrefix. - */ - @java.lang.Override - public java.lang.String getKeyPrefix() { - java.lang.Object ref = keyPrefix_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyPrefix_ = s; - return s; - } + public static com.google.firestore.admin.v1.Database parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
-   * Output only. The key_prefix for this database. This key_prefix is used, in
-   * combination with the project id ("<key prefix>~<project id>") to construct
-   * the application id that is returned from the Cloud Datastore APIs in Google
-   * App Engine first generation runtimes.
-   *
-   * This value may be empty in which case the appid to use for URL-encoded keys
-   * is the project_id (eg: foo instead of v~foo).
-   * 
- * - * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for keyPrefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKeyPrefixBytes() { - java.lang.Object ref = keyPrefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keyPrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + + public static com.google.firestore.admin.v1.Database parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static final int DELETE_PROTECTION_STATE_FIELD_NUMBER = 22; - private int deleteProtectionState_ = 0; - /** - * - * - *
-   * State of delete protection for the database.
-   * 
- * - * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * - * - * @return The enum numeric value on the wire for deleteProtectionState. - */ - @java.lang.Override - public int getDeleteProtectionStateValue() { - return deleteProtectionState_; + public static com.google.firestore.admin.v1.Database parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
-   * State of delete protection for the database.
-   * 
- * - * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * - * - * @return The deleteProtectionState. - */ - @java.lang.Override - public com.google.firestore.admin.v1.Database.DeleteProtectionState getDeleteProtectionState() { - com.google.firestore.admin.v1.Database.DeleteProtectionState result = - com.google.firestore.admin.v1.Database.DeleteProtectionState.forNumber( - deleteProtectionState_); - return result == null - ? com.google.firestore.admin.v1.Database.DeleteProtectionState.UNRECOGNIZED - : result; + + public static com.google.firestore.admin.v1.Database parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static final int ETAG_FIELD_NUMBER = 99; + public static com.google.firestore.admin.v1.Database parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @SuppressWarnings("serial") - private volatile java.lang.Object etag_ = ""; - /** - * - * - *
-   * This checksum is computed by the server based on the value of other
-   * fields, and may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
-   * 
- * - * string etag = 99; - * - * @return The etag. - */ @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.Database prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** * * *
-   * This checksum is computed by the server based on the value of other
-   * fields, and may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * A Cloud Firestore Database.
    * 
* - * string etag = 99; - * - * @return The bytes for etag. + * Protobuf type {@code google.firestore.admin.v1.Database} */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database) + com.google.firestore.admin.v1.DatabaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_descriptor; } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uid_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(6, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, locationId_); - } - if (type_ - != com.google.firestore.admin.v1.Database.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(10, type_); - } - if (concurrencyMode_ - != com.google.firestore.admin.v1.Database.ConcurrencyMode.CONCURRENCY_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(15, concurrencyMode_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(17, getVersionRetentionPeriod()); + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 29: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(18, getEarliestVersionTime()); + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 29: + return internalGetMutableTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } } - if (appEngineIntegrationMode_ - != com.google.firestore.admin.v1.Database.AppEngineIntegrationMode - .APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(19, appEngineIntegrationMode_); + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Database.class, + com.google.firestore.admin.v1.Database.Builder.class); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPrefix_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 20, keyPrefix_); + + // Construct using com.google.firestore.admin.v1.Database.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - if (pointInTimeRecoveryEnablement_ - != com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - .POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED - .getNumber()) { - output.writeEnum(21, pointInTimeRecoveryEnablement_); + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - if (deleteProtectionState_ - != com.google.firestore.admin.v1.Database.DeleteProtectionState - .DELETE_PROTECTION_STATE_UNSPECIFIED - .getNumber()) { - output.writeEnum(22, deleteProtectionState_); + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getDeleteTimeFieldBuilder(); + getVersionRetentionPeriodFieldBuilder(); + getEarliestVersionTimeFieldBuilder(); + getCmekConfigFieldBuilder(); + getSourceInfoFieldBuilder(); + } } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 99, etag_); + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + locationId_ = ""; + type_ = 0; + concurrencyMode_ = 0; + versionRetentionPeriod_ = null; + if (versionRetentionPeriodBuilder_ != null) { + versionRetentionPeriodBuilder_.dispose(); + versionRetentionPeriodBuilder_ = null; + } + earliestVersionTime_ = null; + if (earliestVersionTimeBuilder_ != null) { + earliestVersionTimeBuilder_.dispose(); + earliestVersionTimeBuilder_ = null; + } + pointInTimeRecoveryEnablement_ = 0; + appEngineIntegrationMode_ = 0; + keyPrefix_ = ""; + deleteProtectionState_ = 0; + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; + } + previousId_ = ""; + sourceInfo_ = null; + if (sourceInfoBuilder_ != null) { + sourceInfoBuilder_.dispose(); + sourceInfoBuilder_ = null; + } + internalGetMutableTags().clear(); + freeTier_ = false; + etag_ = ""; + databaseEdition_ = 0; + return this; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.DatabaseProto + .internal_static_google_firestore_admin_v1_Database_descriptor; + } - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + @java.lang.Override + public com.google.firestore.admin.v1.Database getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Database.getDefaultInstance(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uid_); + + @java.lang.Override + public com.google.firestore.admin.v1.Database build() { + com.google.firestore.admin.v1.Database result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + + @java.lang.Override + public com.google.firestore.admin.v1.Database buildPartial() { + com.google.firestore.admin.v1.Database result = + new com.google.firestore.admin.v1.Database(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + + private void buildPartial0(com.google.firestore.admin.v1.Database result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.locationId_ = locationId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.concurrencyMode_ = concurrencyMode_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.versionRetentionPeriod_ = + versionRetentionPeriodBuilder_ == null + ? versionRetentionPeriod_ + : versionRetentionPeriodBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.earliestVersionTime_ = + earliestVersionTimeBuilder_ == null + ? earliestVersionTime_ + : earliestVersionTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.pointInTimeRecoveryEnablement_ = pointInTimeRecoveryEnablement_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.appEngineIntegrationMode_ = appEngineIntegrationMode_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.keyPrefix_ = keyPrefix_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.deleteProtectionState_ = deleteProtectionState_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.cmekConfig_ = cmekConfigBuilder_ == null ? cmekConfig_ : cmekConfigBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.previousId_ = previousId_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.sourceInfo_ = sourceInfoBuilder_ == null ? sourceInfo_ : sourceInfoBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.freeTier_ = freeTier_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.databaseEdition_ = databaseEdition_; + } + result.bitField0_ |= to_bitField0_; } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, locationId_); + + @java.lang.Override + public Builder clone() { + return super.clone(); } - if (type_ - != com.google.firestore.admin.v1.Database.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - if (concurrencyMode_ - != com.google.firestore.admin.v1.Database.ConcurrencyMode.CONCURRENCY_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, concurrencyMode_); + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - if (((bitField0_ & 0x00000004) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(17, getVersionRetentionPeriod()); + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - if (((bitField0_ & 0x00000008) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEarliestVersionTime()); + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - if (appEngineIntegrationMode_ - != com.google.firestore.admin.v1.Database.AppEngineIntegrationMode - .APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, appEngineIntegrationMode_); + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPrefix_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, keyPrefix_); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Database) { + return mergeFrom((com.google.firestore.admin.v1.Database) other); + } else { + super.mergeFrom(other); + return this; + } } - if (pointInTimeRecoveryEnablement_ - != com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - .POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED - .getNumber()) { - size += - com.google.protobuf.CodedOutputStream.computeEnumSize(21, pointInTimeRecoveryEnablement_); + + public Builder mergeFrom(com.google.firestore.admin.v1.Database other) { + if (other == com.google.firestore.admin.v1.Database.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.concurrencyMode_ != 0) { + setConcurrencyModeValue(other.getConcurrencyModeValue()); + } + if (other.hasVersionRetentionPeriod()) { + mergeVersionRetentionPeriod(other.getVersionRetentionPeriod()); + } + if (other.hasEarliestVersionTime()) { + mergeEarliestVersionTime(other.getEarliestVersionTime()); + } + if (other.pointInTimeRecoveryEnablement_ != 0) { + setPointInTimeRecoveryEnablementValue(other.getPointInTimeRecoveryEnablementValue()); + } + if (other.appEngineIntegrationMode_ != 0) { + setAppEngineIntegrationModeValue(other.getAppEngineIntegrationModeValue()); + } + if (!other.getKeyPrefix().isEmpty()) { + keyPrefix_ = other.keyPrefix_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.deleteProtectionState_ != 0) { + setDeleteProtectionStateValue(other.getDeleteProtectionStateValue()); + } + if (other.hasCmekConfig()) { + mergeCmekConfig(other.getCmekConfig()); + } + if (!other.getPreviousId().isEmpty()) { + previousId_ = other.previousId_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.hasSourceInfo()) { + mergeSourceInfo(other.getSourceInfo()); + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00020000; + if (other.hasFreeTier()) { + setFreeTier(other.getFreeTier()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00080000; + onChanged(); + } + if (other.databaseEdition_ != 0) { + setDatabaseEditionValue(other.getDatabaseEditionValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - if (deleteProtectionState_ - != com.google.firestore.admin.v1.Database.DeleteProtectionState - .DELETE_PROTECTION_STATE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, deleteProtectionState_); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(99, etag_); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 58: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 58 + case 74: + { + locationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 80: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 80 + case 120: + { + concurrencyMode_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 120 + case 138: + { + input.readMessage( + getVersionRetentionPeriodFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 138 + case 146: + { + input.readMessage( + getEarliestVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 146 + case 152: + { + appEngineIntegrationMode_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 152 + case 162: + { + keyPrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 162 + case 168: + { + pointInTimeRecoveryEnablement_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 168 + case 176: + { + deleteProtectionState_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 176 + case 186: + { + input.readMessage(getCmekConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 186 + case 202: + { + previousId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 202 + case 210: + { + input.readMessage(getSourceInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 210 + case 224: + { + databaseEdition_ = input.readEnum(); + bitField0_ |= 0x00100000; + break; + } // case 224 + case 234: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00020000; + break; + } // case 234 + case 240: + { + freeTier_ = input.readBool(); + bitField0_ |= 0x00040000; + break; + } // case 240 + case 794: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 794 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.firestore.admin.v1.Database)) { - return super.equals(obj); - } - com.google.firestore.admin.v1.Database other = (com.google.firestore.admin.v1.Database) obj; + private int bitField0_; - if (!getName().equals(other.getName())) return false; - if (!getUid().equals(other.getUid())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getLocationId().equals(other.getLocationId())) return false; - if (type_ != other.type_) return false; - if (concurrencyMode_ != other.concurrencyMode_) return false; - if (hasVersionRetentionPeriod() != other.hasVersionRetentionPeriod()) return false; - if (hasVersionRetentionPeriod()) { - if (!getVersionRetentionPeriod().equals(other.getVersionRetentionPeriod())) return false; - } - if (hasEarliestVersionTime() != other.hasEarliestVersionTime()) return false; - if (hasEarliestVersionTime()) { - if (!getEarliestVersionTime().equals(other.getEarliestVersionTime())) return false; - } - if (pointInTimeRecoveryEnablement_ != other.pointInTimeRecoveryEnablement_) return false; - if (appEngineIntegrationMode_ != other.appEngineIntegrationMode_) return false; - if (!getKeyPrefix().equals(other.getKeyPrefix())) return false; - if (deleteProtectionState_ != other.deleteProtectionState_) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + private java.lang.Object name_ = ""; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
+     * The resource name of the Database.
+     * Format: `projects/{project}/databases/{database}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); + + /** + * + * + *
+     * The resource name of the Database.
+     * Format: `projects/{project}/databases/{database}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); + + /** + * + * + *
+     * The resource name of the Database.
+     * Format: `projects/{project}/databases/{database}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + CONCURRENCY_MODE_FIELD_NUMBER; - hash = (53 * hash) + concurrencyMode_; - if (hasVersionRetentionPeriod()) { - hash = (37 * hash) + VERSION_RETENTION_PERIOD_FIELD_NUMBER; - hash = (53 * hash) + getVersionRetentionPeriod().hashCode(); + + /** + * + * + *
+     * The resource name of the Database.
+     * Format: `projects/{project}/databases/{database}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } - if (hasEarliestVersionTime()) { - hash = (37 * hash) + EARLIEST_VERSION_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEarliestVersionTime().hashCode(); + + /** + * + * + *
+     * The resource name of the Database.
+     * Format: `projects/{project}/databases/{database}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - hash = (37 * hash) + POINT_IN_TIME_RECOVERY_ENABLEMENT_FIELD_NUMBER; - hash = (53 * hash) + pointInTimeRecoveryEnablement_; - hash = (37 * hash) + APP_ENGINE_INTEGRATION_MODE_FIELD_NUMBER; - hash = (53 * hash) + appEngineIntegrationMode_; - hash = (37 * hash) + KEY_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getKeyPrefix().hashCode(); - hash = (37 * hash) + DELETE_PROTECTION_STATE_FIELD_NUMBER; - hash = (53 * hash) + deleteProtectionState_; - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.firestore.admin.v1.Database parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private java.lang.Object uid_ = ""; - public static com.google.firestore.admin.v1.Database parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+     * Output only. The system-generated UUID4 for this Database.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static com.google.firestore.admin.v1.Database parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
+     * Output only. The system-generated UUID4 for this Database.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.firestore.admin.v1.Database parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+     * Output only. The system-generated UUID4 for this Database.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static com.google.firestore.admin.v1.Database parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
+     * Output only. The system-generated UUID4 for this Database.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - public static com.google.firestore.admin.v1.Database parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+     * Output only. The system-generated UUID4 for this Database.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static com.google.firestore.admin.v1.Database parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; - public static com.google.firestore.admin.v1.Database parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } - public static com.google.firestore.admin.v1.Database parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } - public static com.google.firestore.admin.v1.Database parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public static com.google.firestore.admin.v1.Database parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public static com.google.firestore.admin.v1.Database parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } - public static Builder newBuilder(com.google.firestore.admin.v1.Database prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
+     * Output only. The timestamp at which this database was created. Databases
+     * created before 2016 do not populate create_time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Cloud Firestore Database.
-   * 
- * - * Protobuf type {@code google.firestore.admin.v1.Database} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Database) - com.google.firestore.admin.v1.DatabaseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.firestore.admin.v1.DatabaseProto - .internal_static_google_firestore_admin_v1_Database_descriptor; + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.firestore.admin.v1.DatabaseProto - .internal_static_google_firestore_admin_v1_Database_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.firestore.admin.v1.Database.class, - com.google.firestore.admin.v1.Database.Builder.class); + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } } - // Construct using com.google.firestore.admin.v1.Database.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCreateTimeFieldBuilder(); - getUpdateTimeFieldBuilder(); - getVersionRetentionPeriodFieldBuilder(); - getEarliestVersionTimeFieldBuilder(); + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); } + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - uid_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } - locationId_ = ""; - type_ = 0; - concurrencyMode_ = 0; - versionRetentionPeriod_ = null; - if (versionRetentionPeriodBuilder_ != null) { - versionRetentionPeriodBuilder_.dispose(); - versionRetentionPeriodBuilder_ = null; - } - earliestVersionTime_ = null; - if (earliestVersionTimeBuilder_ != null) { - earliestVersionTimeBuilder_.dispose(); - earliestVersionTimeBuilder_ = null; - } - pointInTimeRecoveryEnablement_ = 0; - appEngineIntegrationMode_ = 0; - keyPrefix_ = ""; - deleteProtectionState_ = 0; - etag_ = ""; + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.firestore.admin.v1.DatabaseProto - .internal_static_google_firestore_admin_v1_Database_descriptor; - } - - @java.lang.Override - public com.google.firestore.admin.v1.Database getDefaultInstanceForType() { - return com.google.firestore.admin.v1.Database.getDefaultInstance(); - } - - @java.lang.Override - public com.google.firestore.admin.v1.Database build() { - com.google.firestore.admin.v1.Database result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); } - @java.lang.Override - public com.google.firestore.admin.v1.Database buildPartial() { - com.google.firestore.admin.v1.Database result = - new com.google.firestore.admin.v1.Database(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; } - onBuilt(); - return result; } - private void buildPartial0(com.google.firestore.admin.v1.Database result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uid_ = uid_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.locationId_ = locationId_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.concurrencyMode_ = concurrencyMode_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.versionRetentionPeriod_ = - versionRetentionPeriodBuilder_ == null - ? versionRetentionPeriod_ - : versionRetentionPeriodBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.earliestVersionTime_ = - earliestVersionTimeBuilder_ == null - ? earliestVersionTime_ - : earliestVersionTimeBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.pointInTimeRecoveryEnablement_ = pointInTimeRecoveryEnablement_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.appEngineIntegrationMode_ = appEngineIntegrationMode_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.keyPrefix_ = keyPrefix_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.deleteProtectionState_ = deleteProtectionState_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.etag_ = etag_; + /** + * + * + *
+     * Output only. The timestamp at which this database was most recently
+     * updated. Note this only includes updates to the database resource and not
+     * data contained by the database.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + return updateTimeBuilder_; } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000010) != 0); } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.admin.v1.Database) { - return mergeFrom((com.google.firestore.admin.v1.Database) other); + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; } else { - super.mergeFrom(other); - return this; + deleteTimeBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); + return this; } - public Builder mergeFrom(com.google.firestore.admin.v1.Database other) { - if (other == com.google.firestore.admin.v1.Database.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; + if (deleteTime_ != null) { bitField0_ |= 0x00000010; onChanged(); } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.concurrencyMode_ != 0) { - setConcurrencyModeValue(other.getConcurrencyModeValue()); - } - if (other.hasVersionRetentionPeriod()) { - mergeVersionRetentionPeriod(other.getVersionRetentionPeriod()); - } - if (other.hasEarliestVersionTime()) { - mergeEarliestVersionTime(other.getEarliestVersionTime()); - } - if (other.pointInTimeRecoveryEnablement_ != 0) { - setPointInTimeRecoveryEnablementValue(other.getPointInTimeRecoveryEnablementValue()); - } - if (other.appEngineIntegrationMode_ != 0) { - setAppEngineIntegrationModeValue(other.getAppEngineIntegrationModeValue()); - } - if (!other.getKeyPrefix().isEmpty()) { - keyPrefix_ = other.keyPrefix_; - bitField0_ |= 0x00000800; - onChanged(); - } - if (other.deleteProtectionState_ != 0) { - setDeleteProtectionStateValue(other.getDeleteProtectionStateValue()); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - bitField0_ |= 0x00002000; - onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000010); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; } - this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getDeleteTimeFieldBuilder().getBuilder(); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - case 42: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 42 - case 50: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 50 - case 74: - { - locationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 74 - case 80: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 80 - case 120: - { - concurrencyMode_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 120 - case 138: - { - input.readMessage( - getVersionRetentionPeriodFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 138 - case 146: - { - input.readMessage( - getEarliestVersionTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 146 - case 152: - { - appEngineIntegrationMode_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 152 - case 162: - { - keyPrefix_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - break; - } // case 162 - case 168: - { - pointInTimeRecoveryEnablement_ = input.readEnum(); - bitField0_ |= 0x00000200; - break; - } // case 168 - case 176: - { - deleteProtectionState_ = input.readEnum(); - bitField0_ |= 0x00001000; - break; - } // case 176 - case 794: - { - etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - break; - } // case 794 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; } - private int bitField0_; + /** + * + * + *
+     * Output only. The timestamp at which this database was deleted. Only set if
+     * the database has been deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private java.lang.Object locationId_ = ""; - private java.lang.Object name_ = ""; /** * * *
-     * The resource name of the Database.
-     * Format: `projects/{project}/databases/{database}`
+     * The location of the database. Available locations are listed at
+     * https://cloud.google.com/firestore/docs/locations.
      * 
* - * string name = 1; + * string location_id = 9; * - * @return The name. + * @return The locationId. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + locationId_ = s; return s; } else { return (java.lang.String) ref; } } + /** * * *
-     * The resource name of the Database.
-     * Format: `projects/{project}/databases/{database}`
+     * The location of the database. Available locations are listed at
+     * https://cloud.google.com/firestore/docs/locations.
      * 
* - * string name = 1; + * string location_id = 9; * - * @return The bytes for name. + * @return The bytes for locationId. */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; + locationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * * *
-     * The resource name of the Database.
-     * Format: `projects/{project}/databases/{database}`
+     * The location of the database. Available locations are listed at
+     * https://cloud.google.com/firestore/docs/locations.
      * 
* - * string name = 1; + * string location_id = 9; * - * @param value The name to set. + * @param value The locationId to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setLocationId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; + locationId_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } + /** * * *
-     * The resource name of the Database.
-     * Format: `projects/{project}/databases/{database}`
+     * The location of the database. Available locations are listed at
+     * https://cloud.google.com/firestore/docs/locations.
      * 
* - * string name = 1; + * string location_id = 9; * * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearLocationId() { + locationId_ = getDefaultInstance().getLocationId(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } + /** * * *
-     * The resource name of the Database.
-     * Format: `projects/{project}/databases/{database}`
+     * The location of the database. Available locations are listed at
+     * https://cloud.google.com/firestore/docs/locations.
      * 
* - * string name = 1; + * string location_id = 9; * - * @param value The bytes for name to set. + * @param value The bytes for locationId to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; + locationId_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } - private java.lang.Object uid_ = ""; + private int type_ = 0; + /** * * *
-     * Output only. The system-generated UUID4 for this Database.
+     * The type of the database.
+     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
+     * information about how to choose.
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DatabaseType type = 10; * - * @return The uid. + * @return The enum numeric value on the wire for type. */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public int getTypeValue() { + return type_; } + /** * * *
-     * Output only. The system-generated UUID4 for this Database.
+     * The type of the database.
+     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
+     * information about how to choose.
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DatabaseType type = 10; * - * @return The bytes for uid. + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; } + /** * * *
-     * Output only. The system-generated UUID4 for this Database.
+     * The type of the database.
+     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
+     * information about how to choose.
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DatabaseType type = 10; * - * @param value The uid to set. + * @return The type. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.DatabaseType getType() { + com.google.firestore.admin.v1.Database.DatabaseType result = + com.google.firestore.admin.v1.Database.DatabaseType.forNumber(type_); + return result == null + ? com.google.firestore.admin.v1.Database.DatabaseType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The type of the database.
+     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
+     * information about how to choose.
+     * 
+ * + * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * @param value The type to set. * @return This builder for chaining. */ - public Builder setUid(java.lang.String value) { + public Builder setType(com.google.firestore.admin.v1.Database.DatabaseType value) { if (value == null) { throw new NullPointerException(); } - uid_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000040; + type_ = value.getNumber(); onChanged(); return this; } + /** * * *
-     * Output only. The system-generated UUID4 for this Database.
+     * The type of the database.
+     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
+     * information about how to choose.
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DatabaseType type = 10; * * @return This builder for chaining. */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000040); + type_ = 0; onChanged(); return this; } + + private int concurrencyMode_ = 0; + /** * * *
-     * Output only. The system-generated UUID4 for this Database.
+     * The concurrency control mode to use for this database.
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; * - * @param value The bytes for uid to set. - * @return This builder for chaining. + * @return The enum numeric value on the wire for concurrencyMode. */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + @java.lang.Override + public int getConcurrencyModeValue() { + return concurrencyMode_; } - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * The concurrency control mode to use for this database.
      * 
* - * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; * - * @return Whether the createTime field is set. + * @param value The enum numeric value on the wire for concurrencyMode to set. + * @return This builder for chaining. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000004) != 0); + public Builder setConcurrencyModeValue(int value) { + concurrencyMode_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } + /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * The concurrency control mode to use for this database.
      * 
* - * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; * - * @return The createTime. + * @return The concurrencyMode. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } + @java.lang.Override + public com.google.firestore.admin.v1.Database.ConcurrencyMode getConcurrencyMode() { + com.google.firestore.admin.v1.Database.ConcurrencyMode result = + com.google.firestore.admin.v1.Database.ConcurrencyMode.forNumber(concurrencyMode_); + return result == null + ? com.google.firestore.admin.v1.Database.ConcurrencyMode.UNRECOGNIZED + : result; } + /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * The concurrency control mode to use for this database.
      * 
* - * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * @param value The concurrencyMode to set. + * @return This builder for chaining. */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); + public Builder setConcurrencyMode( + com.google.firestore.admin.v1.Database.ConcurrencyMode value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000080; + concurrencyMode_ = value.getNumber(); onChanged(); return this; } + /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * The concurrency control mode to use for this database.
      * 
* - * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * @return This builder for chaining. */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; + public Builder clearConcurrencyMode() { + bitField0_ = (bitField0_ & ~0x00000080); + concurrencyMode_ = 0; onChanged(); return this; } + + private com.google.protobuf.Duration versionRetentionPeriod_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + versionRetentionPeriodBuilder_; + /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return Whether the versionRetentionPeriod field is set. */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; + public boolean hasVersionRetentionPeriod() { + return ((bitField0_ & 0x00000100) != 0); } + /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The versionRetentionPeriod. */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public com.google.protobuf.Duration getVersionRetentionPeriod() { + if (versionRetentionPeriodBuilder_ == null) { + return versionRetentionPeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : versionRetentionPeriod_; + } else { + return versionRetentionPeriodBuilder_.getMessage(); } - onChanged(); - return this; } + /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** + * Output only. The period during which past versions of data are retained in + * the database. * + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. * - *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); + public Builder setVersionRetentionPeriod(com.google.protobuf.Duration value) { + if (versionRetentionPeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + versionRetentionPeriod_ = value; } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + versionRetentionPeriodBuilder_.setMessage(value); } + bitField0_ |= 0x00000100; + onChanged(); + return this; } + /** * * *
-     * Output only. The timestamp at which this database was created. Databases
-     * created before 2016 do not populate create_time.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; + public Builder setVersionRetentionPeriod(com.google.protobuf.Duration.Builder builderForValue) { + if (versionRetentionPeriodBuilder_ == null) { + versionRetentionPeriod_ = builderForValue.build(); + } else { + versionRetentionPeriodBuilder_.setMessage(builderForValue.build()); } - return createTimeBuilder_; + bitField0_ |= 0x00000100; + onChanged(); + return this; } - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the updateTime field is set. */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000008) != 0); + public Builder mergeVersionRetentionPeriod(com.google.protobuf.Duration value) { + if (versionRetentionPeriodBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && versionRetentionPeriod_ != null + && versionRetentionPeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { + getVersionRetentionPeriodBuilder().mergeFrom(value); + } else { + versionRetentionPeriod_ = value; + } + } else { + versionRetentionPeriodBuilder_.mergeFrom(value); + } + if (versionRetentionPeriod_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; } + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The updateTime. */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); + public Builder clearVersionRetentionPeriod() { + bitField0_ = (bitField0_ & ~0x00000100); + versionRetentionPeriod_ = null; + if (versionRetentionPeriodBuilder_ != null) { + versionRetentionPeriodBuilder_.dispose(); + versionRetentionPeriodBuilder_ = null; } + onChanged(); + return this; } + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; + public com.google.protobuf.Duration.Builder getVersionRetentionPeriodBuilder() { + bitField0_ |= 0x00000100; onChanged(); - return this; + return getVersionRetentionPeriodFieldBuilder().getBuilder(); } + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); + public com.google.protobuf.DurationOrBuilder getVersionRetentionPeriodOrBuilder() { + if (versionRetentionPeriodBuilder_ != null) { + return versionRetentionPeriodBuilder_.getMessageOrBuilder(); } else { - updateTimeBuilder_.setMessage(builderForValue.build()); + return versionRetentionPeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : versionRetentionPeriod_; } - bitField0_ |= 0x00000008; - onChanged(); - return this; } + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The period during which past versions of data are retained in
+     * the database.
+     *
+     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
+     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
+     * a `read_time` within this window, and will read the state of the database
+     * at that time.
+     *
+     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
+     * the retention period is 1 hour.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000008; - onChanged(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getVersionRetentionPeriodFieldBuilder() { + if (versionRetentionPeriodBuilder_ == null) { + versionRetentionPeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getVersionRetentionPeriod(), getParentForChildren(), isClean()); + versionRetentionPeriod_ = null; } - return this; + return versionRetentionPeriodBuilder_; } + + private com.google.protobuf.Timestamp earliestVersionTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + earliestVersionTimeBuilder_; + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The earliest timestamp at which older versions of the data can
+     * be read from the database. See [version_retention_period] above; this field
+     * is populated with `now - version_retention_period`.
+     *
+     * This value is continuously updated, and becomes stale the moment it is
+     * queried. If you are using this value to recover data, make sure to account
+     * for the time from the moment when the value is queried to the moment when
+     * you initiate the recovery.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return Whether the earliestVersionTime field is set. */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; + public boolean hasEarliestVersionTime() { + return ((bitField0_ & 0x00000200) != 0); } + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The earliest timestamp at which older versions of the data can
+     * be read from the database. See [version_retention_period] above; this field
+     * is populated with `now - version_retention_period`.
+     *
+     * This value is continuously updated, and becomes stale the moment it is
+     * queried. If you are using this value to recover data, make sure to account
+     * for the time from the moment when the value is queried to the moment when
+     * you initiate the recovery.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The earliestVersionTime. */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + public com.google.protobuf.Timestamp getEarliestVersionTime() { + if (earliestVersionTimeBuilder_ == null) { + return earliestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : earliestVersionTime_; + } else { + return earliestVersionTimeBuilder_.getMessage(); + } } + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The earliest timestamp at which older versions of the data can
+     * be read from the database. See [version_retention_period] above; this field
+     * is populated with `now - version_retention_period`.
+     *
+     * This value is continuously updated, and becomes stale the moment it is
+     * queried. If you are using this value to recover data, make sure to account
+     * for the time from the moment when the value is queried to the moment when
+     * you initiate the recovery.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); + public Builder setEarliestVersionTime(com.google.protobuf.Timestamp value) { + if (earliestVersionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + earliestVersionTime_ = value; } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; + earliestVersionTimeBuilder_.setMessage(value); } + bitField0_ |= 0x00000200; + onChanged(); + return this; } + /** * * *
-     * Output only. The timestamp at which this database was most recently
-     * updated. Note this only includes updates to the database resource and not
-     * data contained by the database.
+     * Output only. The earliest timestamp at which older versions of the data can
+     * be read from the database. See [version_retention_period] above; this field
+     * is populated with `now - version_retention_period`.
+     *
+     * This value is continuously updated, and becomes stale the moment it is
+     * queried. If you are using this value to recover data, make sure to account
+     * for the time from the moment when the value is queried to the moment when
+     * you initiate the recovery.
      * 
* * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; + public Builder setEarliestVersionTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (earliestVersionTimeBuilder_ == null) { + earliestVersionTime_ = builderForValue.build(); + } else { + earliestVersionTimeBuilder_.setMessage(builderForValue.build()); } - return updateTimeBuilder_; + bitField0_ |= 0x00000200; + onChanged(); + return this; } - private java.lang.Object locationId_ = ""; /** * * *
-     * The location of the database. Available locations are listed at
-     * https://cloud.google.com/firestore/docs/locations.
-     * 
+ * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. * - * string location_id = 9; + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * * - * @return The locationId. + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; + public Builder mergeEarliestVersionTime(com.google.protobuf.Timestamp value) { + if (earliestVersionTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && earliestVersionTime_ != null + && earliestVersionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEarliestVersionTimeBuilder().mergeFrom(value); + } else { + earliestVersionTime_ = value; + } } else { - return (java.lang.String) ref; + earliestVersionTimeBuilder_.mergeFrom(value); + } + if (earliestVersionTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); } + return this; } + /** * * *
-     * The location of the database. Available locations are listed at
-     * https://cloud.google.com/firestore/docs/locations.
-     * 
+ * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. * - * string location_id = 9; + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * * - * @return The bytes for locationId. + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder clearEarliestVersionTime() { + bitField0_ = (bitField0_ & ~0x00000200); + earliestVersionTime_ = null; + if (earliestVersionTimeBuilder_ != null) { + earliestVersionTimeBuilder_.dispose(); + earliestVersionTimeBuilder_ = null; } + onChanged(); + return this; } + /** * * *
-     * The location of the database. Available locations are listed at
-     * https://cloud.google.com/firestore/docs/locations.
-     * 
+ * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. * - * string location_id = 9; + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * * - * @param value The locationId to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setLocationId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - locationId_ = value; - bitField0_ |= 0x00000010; + public com.google.protobuf.Timestamp.Builder getEarliestVersionTimeBuilder() { + bitField0_ |= 0x00000200; onChanged(); - return this; + return getEarliestVersionTimeFieldBuilder().getBuilder(); } + /** * * *
-     * The location of the database. Available locations are listed at
-     * https://cloud.google.com/firestore/docs/locations.
-     * 
+ * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. * - * string location_id = 9; + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearLocationId() { - locationId_ = getDefaultInstance().getLocationId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; + public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder() { + if (earliestVersionTimeBuilder_ != null) { + return earliestVersionTimeBuilder_.getMessageOrBuilder(); + } else { + return earliestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : earliestVersionTime_; + } } + /** * * *
-     * The location of the database. Available locations are listed at
-     * https://cloud.google.com/firestore/docs/locations.
-     * 
+ * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. * - * string location_id = 9; + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * * - * @param value The bytes for locationId to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEarliestVersionTimeFieldBuilder() { + if (earliestVersionTimeBuilder_ == null) { + earliestVersionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEarliestVersionTime(), getParentForChildren(), isClean()); + earliestVersionTime_ = null; } - checkByteStringIsUtf8(value); - locationId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; + return earliestVersionTimeBuilder_; } - private int type_ = 0; + private int pointInTimeRecoveryEnablement_ = 0; + /** * * *
-     * The type of the database.
-     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
-     * information about how to choose.
+     * Whether to enable the PITR feature on this database.
      * 
* - * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * * - * @return The enum numeric value on the wire for type. + * @return The enum numeric value on the wire for pointInTimeRecoveryEnablement. */ @java.lang.Override - public int getTypeValue() { - return type_; + public int getPointInTimeRecoveryEnablementValue() { + return pointInTimeRecoveryEnablement_; } + /** * * *
-     * The type of the database.
-     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
-     * information about how to choose.
+     * Whether to enable the PITR feature on this database.
      * 
* - * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * * - * @param value The enum numeric value on the wire for type to set. + * @param value The enum numeric value on the wire for pointInTimeRecoveryEnablement to set. * @return This builder for chaining. */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000020; + public Builder setPointInTimeRecoveryEnablementValue(int value) { + pointInTimeRecoveryEnablement_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } + /** * * *
-     * The type of the database.
-     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
-     * information about how to choose.
+     * Whether to enable the PITR feature on this database.
      * 
* - * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * * - * @return The type. + * @return The pointInTimeRecoveryEnablement. */ @java.lang.Override - public com.google.firestore.admin.v1.Database.DatabaseType getType() { - com.google.firestore.admin.v1.Database.DatabaseType result = - com.google.firestore.admin.v1.Database.DatabaseType.forNumber(type_); + public com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + getPointInTimeRecoveryEnablement() { + com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement result = + com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.forNumber( + pointInTimeRecoveryEnablement_); return result == null - ? com.google.firestore.admin.v1.Database.DatabaseType.UNRECOGNIZED + ? com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.UNRECOGNIZED : result; } + /** * * *
-     * The type of the database.
-     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
-     * information about how to choose.
+     * Whether to enable the PITR feature on this database.
      * 
* - * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * * - * @param value The type to set. + * @param value The pointInTimeRecoveryEnablement to set. * @return This builder for chaining. */ - public Builder setType(com.google.firestore.admin.v1.Database.DatabaseType value) { + public Builder setPointInTimeRecoveryEnablement( + com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; - type_ = value.getNumber(); + bitField0_ |= 0x00000400; + pointInTimeRecoveryEnablement_ = value.getNumber(); onChanged(); return this; } + /** * * *
-     * The type of the database.
-     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
-     * information about how to choose.
+     * Whether to enable the PITR feature on this database.
      * 
* - * .google.firestore.admin.v1.Database.DatabaseType type = 10; + * + * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * * * @return This builder for chaining. */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000020); - type_ = 0; + public Builder clearPointInTimeRecoveryEnablement() { + bitField0_ = (bitField0_ & ~0x00000400); + pointInTimeRecoveryEnablement_ = 0; onChanged(); return this; } - private int concurrencyMode_ = 0; + private int appEngineIntegrationMode_ = 0; + /** * * *
-     * The concurrency control mode to use for this database.
+     * The App Engine integration mode to use for this database.
      * 
* - * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * * - * @return The enum numeric value on the wire for concurrencyMode. + * @return The enum numeric value on the wire for appEngineIntegrationMode. */ @java.lang.Override - public int getConcurrencyModeValue() { - return concurrencyMode_; + public int getAppEngineIntegrationModeValue() { + return appEngineIntegrationMode_; } + /** * * *
-     * The concurrency control mode to use for this database.
+     * The App Engine integration mode to use for this database.
      * 
* - * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * * - * @param value The enum numeric value on the wire for concurrencyMode to set. + * @param value The enum numeric value on the wire for appEngineIntegrationMode to set. * @return This builder for chaining. */ - public Builder setConcurrencyModeValue(int value) { - concurrencyMode_ = value; - bitField0_ |= 0x00000040; + public Builder setAppEngineIntegrationModeValue(int value) { + appEngineIntegrationMode_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } + /** * * *
-     * The concurrency control mode to use for this database.
+     * The App Engine integration mode to use for this database.
      * 
* - * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * * - * @return The concurrencyMode. + * @return The appEngineIntegrationMode. */ @java.lang.Override - public com.google.firestore.admin.v1.Database.ConcurrencyMode getConcurrencyMode() { - com.google.firestore.admin.v1.Database.ConcurrencyMode result = - com.google.firestore.admin.v1.Database.ConcurrencyMode.forNumber(concurrencyMode_); + public com.google.firestore.admin.v1.Database.AppEngineIntegrationMode + getAppEngineIntegrationMode() { + com.google.firestore.admin.v1.Database.AppEngineIntegrationMode result = + com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.forNumber( + appEngineIntegrationMode_); return result == null - ? com.google.firestore.admin.v1.Database.ConcurrencyMode.UNRECOGNIZED + ? com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.UNRECOGNIZED : result; } + /** * * *
-     * The concurrency control mode to use for this database.
+     * The App Engine integration mode to use for this database.
      * 
* - * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * * - * @param value The concurrencyMode to set. + * @param value The appEngineIntegrationMode to set. * @return This builder for chaining. */ - public Builder setConcurrencyMode( - com.google.firestore.admin.v1.Database.ConcurrencyMode value) { + public Builder setAppEngineIntegrationMode( + com.google.firestore.admin.v1.Database.AppEngineIntegrationMode value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; - concurrencyMode_ = value.getNumber(); + bitField0_ |= 0x00000800; + appEngineIntegrationMode_ = value.getNumber(); onChanged(); return this; } + /** * * *
-     * The concurrency control mode to use for this database.
+     * The App Engine integration mode to use for this database.
      * 
* - * .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * + * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * * * @return This builder for chaining. */ - public Builder clearConcurrencyMode() { - bitField0_ = (bitField0_ & ~0x00000040); - concurrencyMode_ = 0; + public Builder clearAppEngineIntegrationMode() { + bitField0_ = (bitField0_ & ~0x00000800); + appEngineIntegrationMode_ = 0; onChanged(); return this; } - private com.google.protobuf.Duration versionRetentionPeriod_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - versionRetentionPeriodBuilder_; + private java.lang.Object keyPrefix_ = ""; + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
+     * Output only. The key_prefix for this database. This key_prefix is used, in
+     * combination with the project ID ("<key prefix>~<project id>") to construct
+     * the application ID that is returned from the Cloud Datastore APIs in Google
+     * App Engine first generation runtimes.
      *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * This value may be empty in which case the appid to use for URL-encoded keys
+     * is the project_id (eg: foo instead of v~foo).
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return Whether the versionRetentionPeriod field is set. + * @return The keyPrefix. */ - public boolean hasVersionRetentionPeriod() { - return ((bitField0_ & 0x00000080) != 0); + public java.lang.String getKeyPrefix() { + java.lang.Object ref = keyPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } } + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
+     * Output only. The key_prefix for this database. This key_prefix is used, in
+     * combination with the project ID ("<key prefix>~<project id>") to construct
+     * the application ID that is returned from the Cloud Datastore APIs in Google
+     * App Engine first generation runtimes.
      *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * This value may be empty in which case the appid to use for URL-encoded keys
+     * is the project_id (eg: foo instead of v~foo).
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The versionRetentionPeriod. + * @return The bytes for keyPrefix. */ - public com.google.protobuf.Duration getVersionRetentionPeriod() { - if (versionRetentionPeriodBuilder_ == null) { - return versionRetentionPeriod_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : versionRetentionPeriod_; + public com.google.protobuf.ByteString getKeyPrefixBytes() { + java.lang.Object ref = keyPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyPrefix_ = b; + return b; } else { - return versionRetentionPeriodBuilder_.getMessage(); + return (com.google.protobuf.ByteString) ref; } } + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
+     * Output only. The key_prefix for this database. This key_prefix is used, in
+     * combination with the project ID ("<key prefix>~<project id>") to construct
+     * the application ID that is returned from the Cloud Datastore APIs in Google
+     * App Engine first generation runtimes.
      *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * This value may be empty in which case the appid to use for URL-encoded keys
+     * is the project_id (eg: foo instead of v~foo).
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The keyPrefix to set. + * @return This builder for chaining. */ - public Builder setVersionRetentionPeriod(com.google.protobuf.Duration value) { - if (versionRetentionPeriodBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - versionRetentionPeriod_ = value; - } else { - versionRetentionPeriodBuilder_.setMessage(value); + public Builder setKeyPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000080; + keyPrefix_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
+     * Output only. The key_prefix for this database. This key_prefix is used, in
+     * combination with the project ID ("<key prefix>~<project id>") to construct
+     * the application ID that is returned from the Cloud Datastore APIs in Google
+     * App Engine first generation runtimes.
      *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * This value may be empty in which case the appid to use for URL-encoded keys
+     * is the project_id (eg: foo instead of v~foo).
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public Builder setVersionRetentionPeriod(com.google.protobuf.Duration.Builder builderForValue) { - if (versionRetentionPeriodBuilder_ == null) { - versionRetentionPeriod_ = builderForValue.build(); - } else { - versionRetentionPeriodBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; + public Builder clearKeyPrefix() { + keyPrefix_ = getDefaultInstance().getKeyPrefix(); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
+     * Output only. The key_prefix for this database. This key_prefix is used, in
+     * combination with the project ID ("<key prefix>~<project id>") to construct
+     * the application ID that is returned from the Cloud Datastore APIs in Google
+     * App Engine first generation runtimes.
      *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * This value may be empty in which case the appid to use for URL-encoded keys
+     * is the project_id (eg: foo instead of v~foo).
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for keyPrefix to set. + * @return This builder for chaining. */ - public Builder mergeVersionRetentionPeriod(com.google.protobuf.Duration value) { - if (versionRetentionPeriodBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && versionRetentionPeriod_ != null - && versionRetentionPeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { - getVersionRetentionPeriodBuilder().mergeFrom(value); - } else { - versionRetentionPeriod_ = value; - } - } else { - versionRetentionPeriodBuilder_.mergeFrom(value); - } - if (versionRetentionPeriod_ != null) { - bitField0_ |= 0x00000080; - onChanged(); + public Builder setKeyPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + keyPrefix_ = value; + bitField0_ |= 0x00001000; + onChanged(); return this; } + + private int deleteProtectionState_ = 0; + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
+     * State of delete protection for the database.
+     * 
* - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. + * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * * - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. + * @return The enum numeric value on the wire for deleteProtectionState. + */ + @java.lang.Override + public int getDeleteProtectionStateValue() { + return deleteProtectionState_; + } + + /** + * + * + *
+     * State of delete protection for the database.
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; * + * + * @param value The enum numeric value on the wire for deleteProtectionState to set. + * @return This builder for chaining. */ - public Builder clearVersionRetentionPeriod() { - bitField0_ = (bitField0_ & ~0x00000080); - versionRetentionPeriod_ = null; - if (versionRetentionPeriodBuilder_ != null) { - versionRetentionPeriodBuilder_.dispose(); - versionRetentionPeriodBuilder_ = null; - } + public Builder setDeleteProtectionStateValue(int value) { + deleteProtectionState_ = value; + bitField0_ |= 0x00002000; onChanged(); return this; } + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
-     *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * State of delete protection for the database.
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; * + * + * @return The deleteProtectionState. */ - public com.google.protobuf.Duration.Builder getVersionRetentionPeriodBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getVersionRetentionPeriodFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.firestore.admin.v1.Database.DeleteProtectionState getDeleteProtectionState() { + com.google.firestore.admin.v1.Database.DeleteProtectionState result = + com.google.firestore.admin.v1.Database.DeleteProtectionState.forNumber( + deleteProtectionState_); + return result == null + ? com.google.firestore.admin.v1.Database.DeleteProtectionState.UNRECOGNIZED + : result; } + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
-     *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * State of delete protection for the database.
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; * + * + * @param value The deleteProtectionState to set. + * @return This builder for chaining. */ - public com.google.protobuf.DurationOrBuilder getVersionRetentionPeriodOrBuilder() { - if (versionRetentionPeriodBuilder_ != null) { - return versionRetentionPeriodBuilder_.getMessageOrBuilder(); - } else { - return versionRetentionPeriod_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : versionRetentionPeriod_; + public Builder setDeleteProtectionState( + com.google.firestore.admin.v1.Database.DeleteProtectionState value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00002000; + deleteProtectionState_ = value.getNumber(); + onChanged(); + return this; } + /** * * *
-     * Output only. The period during which past versions of data are retained in
-     * the database.
-     *
-     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
-     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
-     * a `read_time` within this window, and will read the state of the database
-     * at that time.
-     *
-     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
-     * the retention period is 1 hour.
+     * State of delete protection for the database.
      * 
* - * - * .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; * + * + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getVersionRetentionPeriodFieldBuilder() { - if (versionRetentionPeriodBuilder_ == null) { - versionRetentionPeriodBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getVersionRetentionPeriod(), getParentForChildren(), isClean()); - versionRetentionPeriod_ = null; - } - return versionRetentionPeriodBuilder_; + public Builder clearDeleteProtectionState() { + bitField0_ = (bitField0_ & ~0x00002000); + deleteProtectionState_ = 0; + onChanged(); + return this; } - private com.google.protobuf.Timestamp earliestVersionTime_; + private com.google.firestore.admin.v1.Database.CmekConfig cmekConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - earliestVersionTimeBuilder_; + com.google.firestore.admin.v1.Database.CmekConfig, + com.google.firestore.admin.v1.Database.CmekConfig.Builder, + com.google.firestore.admin.v1.Database.CmekConfigOrBuilder> + cmekConfigBuilder_; + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the earliestVersionTime field is set. + * @return Whether the cmekConfig field is set. */ - public boolean hasEarliestVersionTime() { - return ((bitField0_ & 0x00000100) != 0); + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00004000) != 0); } + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The earliestVersionTime. + * @return The cmekConfig. */ - public com.google.protobuf.Timestamp getEarliestVersionTime() { - if (earliestVersionTimeBuilder_ == null) { - return earliestVersionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : earliestVersionTime_; + public com.google.firestore.admin.v1.Database.CmekConfig getCmekConfig() { + if (cmekConfigBuilder_ == null) { + return cmekConfig_ == null + ? com.google.firestore.admin.v1.Database.CmekConfig.getDefaultInstance() + : cmekConfig_; } else { - return earliestVersionTimeBuilder_.getMessage(); + return cmekConfigBuilder_.getMessage(); } } + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setEarliestVersionTime(com.google.protobuf.Timestamp value) { - if (earliestVersionTimeBuilder_ == null) { + public Builder setCmekConfig(com.google.firestore.admin.v1.Database.CmekConfig value) { + if (cmekConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - earliestVersionTime_ = value; + cmekConfig_ = value; } else { - earliestVersionTimeBuilder_.setMessage(value); + cmekConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00004000; onChanged(); return this; } + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setEarliestVersionTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (earliestVersionTimeBuilder_ == null) { - earliestVersionTime_ = builderForValue.build(); + public Builder setCmekConfig( + com.google.firestore.admin.v1.Database.CmekConfig.Builder builderForValue) { + if (cmekConfigBuilder_ == null) { + cmekConfig_ = builderForValue.build(); } else { - earliestVersionTimeBuilder_.setMessage(builderForValue.build()); + cmekConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00004000; onChanged(); return this; } + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeEarliestVersionTime(com.google.protobuf.Timestamp value) { - if (earliestVersionTimeBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && earliestVersionTime_ != null - && earliestVersionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEarliestVersionTimeBuilder().mergeFrom(value); + public Builder mergeCmekConfig(com.google.firestore.admin.v1.Database.CmekConfig value) { + if (cmekConfigBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && cmekConfig_ != null + && cmekConfig_ + != com.google.firestore.admin.v1.Database.CmekConfig.getDefaultInstance()) { + getCmekConfigBuilder().mergeFrom(value); } else { - earliestVersionTime_ = value; + cmekConfig_ = value; } } else { - earliestVersionTimeBuilder_.mergeFrom(value); + cmekConfigBuilder_.mergeFrom(value); } - if (earliestVersionTime_ != null) { - bitField0_ |= 0x00000100; + if (cmekConfig_ != null) { + bitField0_ |= 0x00004000; onChanged(); } return this; } + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearEarliestVersionTime() { - bitField0_ = (bitField0_ & ~0x00000100); - earliestVersionTime_ = null; - if (earliestVersionTimeBuilder_ != null) { - earliestVersionTimeBuilder_.dispose(); - earliestVersionTimeBuilder_ = null; + public Builder clearCmekConfig() { + bitField0_ = (bitField0_ & ~0x00004000); + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; } onChanged(); return this; } + /** * - * - *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     *
+     * 
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.Timestamp.Builder getEarliestVersionTimeBuilder() { - bitField0_ |= 0x00000100; + public com.google.firestore.admin.v1.Database.CmekConfig.Builder getCmekConfigBuilder() { + bitField0_ |= 0x00004000; onChanged(); - return getEarliestVersionTimeFieldBuilder().getBuilder(); + return getCmekConfigFieldBuilder().getBuilder(); } + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder() { - if (earliestVersionTimeBuilder_ != null) { - return earliestVersionTimeBuilder_.getMessageOrBuilder(); + public com.google.firestore.admin.v1.Database.CmekConfigOrBuilder getCmekConfigOrBuilder() { + if (cmekConfigBuilder_ != null) { + return cmekConfigBuilder_.getMessageOrBuilder(); } else { - return earliestVersionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : earliestVersionTime_; + return cmekConfig_ == null + ? com.google.firestore.admin.v1.Database.CmekConfig.getDefaultInstance() + : cmekConfig_; } } + /** * * *
-     * Output only. The earliest timestamp at which older versions of the data can
-     * be read from the database. See [version_retention_period] above; this field
-     * is populated with `now - version_retention_period`.
-     *
-     * This value is continuously updated, and becomes stale the moment it is
-     * queried. If you are using this value to recover data, make sure to account
-     * for the time from the moment when the value is queried to the moment when
-     * you initiate the recovery.
+     * Optional. Presence indicates CMEK is enabled for this database.
      * 
* * - * .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEarliestVersionTimeFieldBuilder() { - if (earliestVersionTimeBuilder_ == null) { - earliestVersionTimeBuilder_ = + com.google.firestore.admin.v1.Database.CmekConfig, + com.google.firestore.admin.v1.Database.CmekConfig.Builder, + com.google.firestore.admin.v1.Database.CmekConfigOrBuilder> + getCmekConfigFieldBuilder() { + if (cmekConfigBuilder_ == null) { + cmekConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEarliestVersionTime(), getParentForChildren(), isClean()); - earliestVersionTime_ = null; + com.google.firestore.admin.v1.Database.CmekConfig, + com.google.firestore.admin.v1.Database.CmekConfig.Builder, + com.google.firestore.admin.v1.Database.CmekConfigOrBuilder>( + getCmekConfig(), getParentForChildren(), isClean()); + cmekConfig_ = null; } - return earliestVersionTimeBuilder_; + return cmekConfigBuilder_; } - private int pointInTimeRecoveryEnablement_ = 0; + private java.lang.Object previousId_ = ""; + /** * * *
-     * Whether to enable the PITR feature on this database.
+     * Output only. The database resource's prior database ID. This field is only
+     * populated for deleted databases.
      * 
* - * - * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The enum numeric value on the wire for pointInTimeRecoveryEnablement. + * @return The previousId. */ - @java.lang.Override - public int getPointInTimeRecoveryEnablementValue() { - return pointInTimeRecoveryEnablement_; + public java.lang.String getPreviousId() { + java.lang.Object ref = previousId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + previousId_ = s; + return s; + } else { + return (java.lang.String) ref; + } } + /** * * *
-     * Whether to enable the PITR feature on this database.
+     * Output only. The database resource's prior database ID. This field is only
+     * populated for deleted databases.
      * 
* - * - * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The enum numeric value on the wire for pointInTimeRecoveryEnablement to set. + * @return The bytes for previousId. + */ + public com.google.protobuf.ByteString getPreviousIdBytes() { + java.lang.Object ref = previousId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + previousId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The database resource's prior database ID. This field is only
+     * populated for deleted databases.
+     * 
+ * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The previousId to set. * @return This builder for chaining. */ - public Builder setPointInTimeRecoveryEnablementValue(int value) { - pointInTimeRecoveryEnablement_ = value; - bitField0_ |= 0x00000200; + public Builder setPreviousId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + previousId_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } + /** * * *
-     * Whether to enable the PITR feature on this database.
+     * Output only. The database resource's prior database ID. This field is only
+     * populated for deleted databases.
      * 
* - * - * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The pointInTimeRecoveryEnablement. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - getPointInTimeRecoveryEnablement() { - com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement result = - com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.forNumber( - pointInTimeRecoveryEnablement_); - return result == null - ? com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement.UNRECOGNIZED - : result; + public Builder clearPreviousId() { + previousId_ = getDefaultInstance().getPreviousId(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; } + /** * * *
-     * Whether to enable the PITR feature on this database.
+     * Output only. The database resource's prior database ID. This field is only
+     * populated for deleted databases.
      * 
* - * - * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The pointInTimeRecoveryEnablement to set. + * @param value The bytes for previousId to set. * @return This builder for chaining. */ - public Builder setPointInTimeRecoveryEnablement( - com.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement value) { + public Builder setPreviousIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; - pointInTimeRecoveryEnablement_ = value.getNumber(); + checkByteStringIsUtf8(value); + previousId_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } + + private com.google.firestore.admin.v1.Database.SourceInfo sourceInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.SourceInfo, + com.google.firestore.admin.v1.Database.SourceInfo.Builder, + com.google.firestore.admin.v1.Database.SourceInfoOrBuilder> + sourceInfoBuilder_; + /** * * *
-     * Whether to enable the PITR feature on this database.
+     * Output only. Information about the provenance of this database.
      * 
* * - * .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return This builder for chaining. + * @return Whether the sourceInfo field is set. */ - public Builder clearPointInTimeRecoveryEnablement() { - bitField0_ = (bitField0_ & ~0x00000200); - pointInTimeRecoveryEnablement_ = 0; - onChanged(); - return this; + public boolean hasSourceInfo() { + return ((bitField0_ & 0x00010000) != 0); } - private int appEngineIntegrationMode_ = 0; /** * * *
-     * The App Engine integration mode to use for this database.
+     * Output only. Information about the provenance of this database.
      * 
* * - * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The enum numeric value on the wire for appEngineIntegrationMode. + * @return The sourceInfo. */ - @java.lang.Override - public int getAppEngineIntegrationModeValue() { - return appEngineIntegrationMode_; + public com.google.firestore.admin.v1.Database.SourceInfo getSourceInfo() { + if (sourceInfoBuilder_ == null) { + return sourceInfo_ == null + ? com.google.firestore.admin.v1.Database.SourceInfo.getDefaultInstance() + : sourceInfo_; + } else { + return sourceInfoBuilder_.getMessage(); + } } + /** * * *
-     * The App Engine integration mode to use for this database.
+     * Output only. Information about the provenance of this database.
      * 
* * - * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The enum numeric value on the wire for appEngineIntegrationMode to set. - * @return This builder for chaining. */ - public Builder setAppEngineIntegrationModeValue(int value) { - appEngineIntegrationMode_ = value; - bitField0_ |= 0x00000400; + public Builder setSourceInfo(com.google.firestore.admin.v1.Database.SourceInfo value) { + if (sourceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceInfo_ = value; + } else { + sourceInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; onChanged(); return this; } + /** * * *
-     * The App Engine integration mode to use for this database.
+     * Output only. Information about the provenance of this database.
      * 
* * - * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The appEngineIntegrationMode. */ - @java.lang.Override - public com.google.firestore.admin.v1.Database.AppEngineIntegrationMode - getAppEngineIntegrationMode() { - com.google.firestore.admin.v1.Database.AppEngineIntegrationMode result = - com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.forNumber( - appEngineIntegrationMode_); - return result == null - ? com.google.firestore.admin.v1.Database.AppEngineIntegrationMode.UNRECOGNIZED - : result; + public Builder setSourceInfo( + com.google.firestore.admin.v1.Database.SourceInfo.Builder builderForValue) { + if (sourceInfoBuilder_ == null) { + sourceInfo_ = builderForValue.build(); + } else { + sourceInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; } + /** * * *
-     * The App Engine integration mode to use for this database.
+     * Output only. Information about the provenance of this database.
      * 
* * - * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + */ + public Builder mergeSourceInfo(com.google.firestore.admin.v1.Database.SourceInfo value) { + if (sourceInfoBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && sourceInfo_ != null + && sourceInfo_ + != com.google.firestore.admin.v1.Database.SourceInfo.getDefaultInstance()) { + getSourceInfoBuilder().mergeFrom(value); + } else { + sourceInfo_ = value; + } + } else { + sourceInfoBuilder_.mergeFrom(value); + } + if (sourceInfo_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + + /** * - * @param value The appEngineIntegrationMode to set. - * @return This builder for chaining. + * + *
+     * Output only. Information about the provenance of this database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAppEngineIntegrationMode( - com.google.firestore.admin.v1.Database.AppEngineIntegrationMode value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearSourceInfo() { + bitField0_ = (bitField0_ & ~0x00010000); + sourceInfo_ = null; + if (sourceInfoBuilder_ != null) { + sourceInfoBuilder_.dispose(); + sourceInfoBuilder_ = null; } - bitField0_ |= 0x00000400; - appEngineIntegrationMode_ = value.getNumber(); onChanged(); return this; } + /** * * *
-     * The App Engine integration mode to use for this database.
+     * Output only. Information about the provenance of this database.
      * 
* * - * .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + */ + public com.google.firestore.admin.v1.Database.SourceInfo.Builder getSourceInfoBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getSourceInfoFieldBuilder().getBuilder(); + } + + /** * - * @return This builder for chaining. + * + *
+     * Output only. Information about the provenance of this database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearAppEngineIntegrationMode() { - bitField0_ = (bitField0_ & ~0x00000400); - appEngineIntegrationMode_ = 0; + public com.google.firestore.admin.v1.Database.SourceInfoOrBuilder getSourceInfoOrBuilder() { + if (sourceInfoBuilder_ != null) { + return sourceInfoBuilder_.getMessageOrBuilder(); + } else { + return sourceInfo_ == null + ? com.google.firestore.admin.v1.Database.SourceInfo.getDefaultInstance() + : sourceInfo_; + } + } + + /** + * + * + *
+     * Output only. Information about the provenance of this database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.SourceInfo, + com.google.firestore.admin.v1.Database.SourceInfo.Builder, + com.google.firestore.admin.v1.Database.SourceInfoOrBuilder> + getSourceInfoFieldBuilder() { + if (sourceInfoBuilder_ == null) { + sourceInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.SourceInfo, + com.google.firestore.admin.v1.Database.SourceInfo.Builder, + com.google.firestore.admin.v1.Database.SourceInfoOrBuilder>( + getSourceInfo(), getParentForChildren(), isClean()); + sourceInfo_ = null; + } + return sourceInfoBuilder_; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + bitField0_ |= 0x00020000; onChanged(); - return this; + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); } - private java.lang.Object keyPrefix_ = ""; /** * * *
-     * Output only. The key_prefix for this database. This key_prefix is used, in
-     * combination with the project id ("<key prefix>~<project id>") to construct
-     * the application id that is returned from the Cloud Datastore APIs in Google
-     * App Engine first generation runtimes.
-     *
-     * This value may be empty in which case the appid to use for URL-encoded keys
-     * is the project_id (eg: foo instead of v~foo).
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
      * 
* - * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The keyPrefix. + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getKeyPrefix() { - java.lang.Object ref = keyPrefix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyPrefix_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); } + /** * * *
-     * Output only. The key_prefix for this database. This key_prefix is used, in
-     * combination with the project id ("<key prefix>~<project id>") to construct
-     * the application id that is returned from the Cloud Datastore APIs in Google
-     * App Engine first generation runtimes.
-     *
-     * This value may be empty in which case the appid to use for URL-encoded keys
-     * is the project_id (eg: foo instead of v~foo).
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
      * 
* - * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for keyPrefix. + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getKeyPrefixBytes() { - java.lang.Object ref = keyPrefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keyPrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * *
-     * Output only. The key_prefix for this database. This key_prefix is used, in
-     * combination with the project id ("<key prefix>~<project id>") to construct
-     * the application id that is returned from the Cloud Datastore APIs in Google
-     * App Engine first generation runtimes.
-     *
-     * This value may be empty in which case the appid to use for URL-encoded keys
-     * is the project_id (eg: foo instead of v~foo).
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
      * 
* - * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The keyPrefix to set. - * @return This builder for chaining. + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setKeyPrefix(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - keyPrefix_ = value; - bitField0_ |= 0x00000800; - onChanged(); + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00020000); + internalGetMutableTags().getMutableMap().clear(); return this; } + /** * * *
-     * Output only. The key_prefix for this database. This key_prefix is used, in
-     * combination with the project id ("<key prefix>~<project id>") to construct
-     * the application id that is returned from the Cloud Datastore APIs in Google
-     * App Engine first generation runtimes.
-     *
-     * This value may be empty in which case the appid to use for URL-encoded keys
-     * is the project_id (eg: foo instead of v~foo).
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
      * 
* - * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearKeyPrefix() { - keyPrefix_ = getDefaultInstance().getKeyPrefix(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); return this; } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + bitField0_ |= 0x00020000; + return internalGetMutableTags().getMutableMap(); + } + /** * * *
-     * Output only. The key_prefix for this database. This key_prefix is used, in
-     * combination with the project id ("<key prefix>~<project id>") to construct
-     * the application id that is returned from the Cloud Datastore APIs in Google
-     * App Engine first generation runtimes.
-     *
-     * This value may be empty in which case the appid to use for URL-encoded keys
-     * is the project_id (eg: foo instead of v~foo).
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
      * 
* - * string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for keyPrefix to set. - * @return This builder for chaining. + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setKeyPrefixBytes(com.google.protobuf.ByteString value) { + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } if (value == null) { - throw new NullPointerException(); + throw new NullPointerException("map value"); } - checkByteStringIsUtf8(value); - keyPrefix_ = value; - bitField0_ |= 0x00000800; - onChanged(); + internalGetMutableTags().getMutableMap().put(key, value); + bitField0_ |= 0x00020000; return this; } - private int deleteProtectionState_ = 0; /** * * *
-     * State of delete protection for the database.
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
      * 
* - * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; * - * - * @return The enum numeric value on the wire for deleteProtectionState. */ - @java.lang.Override - public int getDeleteProtectionStateValue() { - return deleteProtectionState_; + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + bitField0_ |= 0x00020000; + return this; } + + private boolean freeTier_; + /** * * *
-     * State of delete protection for the database.
+     * Output only. Background: Free tier is the ability of a Firestore database
+     * to use a small amount of resources every day without being charged. Once
+     * usage exceeds the free tier limit further usage is charged.
+     *
+     * Whether this database can make use of the free tier. Only one database
+     * per project can be eligible for the free tier.
+     *
+     * The first (or next) database that is created in a project without a free
+     * tier database will be marked as eligible for the free tier. Databases that
+     * are created while there is a free tier database will not be eligible for
+     * the free tier.
      * 
* - * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The enum numeric value on the wire for deleteProtectionState to set. - * @return This builder for chaining. + * @return Whether the freeTier field is set. */ - public Builder setDeleteProtectionStateValue(int value) { - deleteProtectionState_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; + @java.lang.Override + public boolean hasFreeTier() { + return ((bitField0_ & 0x00040000) != 0); } + /** * * *
-     * State of delete protection for the database.
+     * Output only. Background: Free tier is the ability of a Firestore database
+     * to use a small amount of resources every day without being charged. Once
+     * usage exceeds the free tier limit further usage is charged.
+     *
+     * Whether this database can make use of the free tier. Only one database
+     * per project can be eligible for the free tier.
+     *
+     * The first (or next) database that is created in a project without a free
+     * tier database will be marked as eligible for the free tier. Databases that
+     * are created while there is a free tier database will not be eligible for
+     * the free tier.
      * 
* - * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The deleteProtectionState. + * @return The freeTier. */ @java.lang.Override - public com.google.firestore.admin.v1.Database.DeleteProtectionState getDeleteProtectionState() { - com.google.firestore.admin.v1.Database.DeleteProtectionState result = - com.google.firestore.admin.v1.Database.DeleteProtectionState.forNumber( - deleteProtectionState_); - return result == null - ? com.google.firestore.admin.v1.Database.DeleteProtectionState.UNRECOGNIZED - : result; + public boolean getFreeTier() { + return freeTier_; } + /** * * *
-     * State of delete protection for the database.
+     * Output only. Background: Free tier is the ability of a Firestore database
+     * to use a small amount of resources every day without being charged. Once
+     * usage exceeds the free tier limit further usage is charged.
+     *
+     * Whether this database can make use of the free tier. Only one database
+     * per project can be eligible for the free tier.
+     *
+     * The first (or next) database that is created in a project without a free
+     * tier database will be marked as eligible for the free tier. Databases that
+     * are created while there is a free tier database will not be eligible for
+     * the free tier.
      * 
* - * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The deleteProtectionState to set. + * @param value The freeTier to set. * @return This builder for chaining. */ - public Builder setDeleteProtectionState( - com.google.firestore.admin.v1.Database.DeleteProtectionState value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; - deleteProtectionState_ = value.getNumber(); + public Builder setFreeTier(boolean value) { + + freeTier_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } + /** * * *
-     * State of delete protection for the database.
+     * Output only. Background: Free tier is the ability of a Firestore database
+     * to use a small amount of resources every day without being charged. Once
+     * usage exceeds the free tier limit further usage is charged.
+     *
+     * Whether this database can make use of the free tier. Only one database
+     * per project can be eligible for the free tier.
+     *
+     * The first (or next) database that is created in a project without a free
+     * tier database will be marked as eligible for the free tier. Databases that
+     * are created while there is a free tier database will not be eligible for
+     * the free tier.
      * 
* - * .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ - public Builder clearDeleteProtectionState() { - bitField0_ = (bitField0_ & ~0x00001000); - deleteProtectionState_ = 0; + public Builder clearFreeTier() { + bitField0_ = (bitField0_ & ~0x00040000); + freeTier_ = false; onChanged(); return this; } private java.lang.Object etag_ = ""; + /** * * @@ -4388,6 +13027,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -4412,6 +13052,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4431,10 +13072,11 @@ public Builder setEtag(java.lang.String value) { throw new NullPointerException(); } etag_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00080000; onChanged(); return this; } + /** * * @@ -4450,10 +13092,11 @@ public Builder setEtag(java.lang.String value) { */ public Builder clearEtag() { etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } + /** * * @@ -4474,7 +13117,115 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); etag_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + private int databaseEdition_ = 0; + + /** + * + * + *
+     * Immutable. The edition of the database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for databaseEdition. + */ + @java.lang.Override + public int getDatabaseEditionValue() { + return databaseEdition_; + } + + /** + * + * + *
+     * Immutable. The edition of the database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for databaseEdition to set. + * @return This builder for chaining. + */ + public Builder setDatabaseEditionValue(int value) { + databaseEdition_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The edition of the database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The databaseEdition. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.DatabaseEdition getDatabaseEdition() { + com.google.firestore.admin.v1.Database.DatabaseEdition result = + com.google.firestore.admin.v1.Database.DatabaseEdition.forNumber(databaseEdition_); + return result == null + ? com.google.firestore.admin.v1.Database.DatabaseEdition.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Immutable. The edition of the database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The databaseEdition to set. + * @return This builder for chaining. + */ + public Builder setDatabaseEdition( + com.google.firestore.admin.v1.Database.DatabaseEdition value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00100000; + databaseEdition_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The edition of the database.
+     * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearDatabaseEdition() { + bitField0_ = (bitField0_ & ~0x00100000); + databaseEdition_ = 0; onChanged(); return this; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.java index 259990803..3553687e0 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseOrBuilder.java index e2a909294..21446e547 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/database.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface DatabaseOrBuilder @@ -37,6 +37,7 @@ public interface DatabaseOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -63,6 +64,7 @@ public interface DatabaseOrBuilder * @return The uid. */ java.lang.String getUid(); + /** * * @@ -90,6 +92,7 @@ public interface DatabaseOrBuilder * @return Whether the createTime field is set. */ boolean hasCreateTime(); + /** * * @@ -104,6 +107,7 @@ public interface DatabaseOrBuilder * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); + /** * * @@ -132,6 +136,7 @@ public interface DatabaseOrBuilder * @return Whether the updateTime field is set. */ boolean hasUpdateTime(); + /** * * @@ -147,6 +152,7 @@ public interface DatabaseOrBuilder * @return The updateTime. */ com.google.protobuf.Timestamp getUpdateTime(); + /** * * @@ -161,6 +167,49 @@ public interface DatabaseOrBuilder */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + /** + * + * + *
+   * Output only. The timestamp at which this database was deleted. Only set if
+   * the database has been deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + + /** + * + * + *
+   * Output only. The timestamp at which this database was deleted. Only set if
+   * the database has been deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + + /** + * + * + *
+   * Output only. The timestamp at which this database was deleted. Only set if
+   * the database has been deleted.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + /** * * @@ -174,6 +223,7 @@ public interface DatabaseOrBuilder * @return The locationId. */ java.lang.String getLocationId(); + /** * * @@ -202,6 +252,7 @@ public interface DatabaseOrBuilder * @return The enum numeric value on the wire for type. */ int getTypeValue(); + /** * * @@ -229,6 +280,7 @@ public interface DatabaseOrBuilder * @return The enum numeric value on the wire for concurrencyMode. */ int getConcurrencyModeValue(); + /** * * @@ -265,6 +317,7 @@ public interface DatabaseOrBuilder * @return Whether the versionRetentionPeriod field is set. */ boolean hasVersionRetentionPeriod(); + /** * * @@ -288,6 +341,7 @@ public interface DatabaseOrBuilder * @return The versionRetentionPeriod. */ com.google.protobuf.Duration getVersionRetentionPeriod(); + /** * * @@ -331,6 +385,7 @@ public interface DatabaseOrBuilder * @return Whether the earliestVersionTime field is set. */ boolean hasEarliestVersionTime(); + /** * * @@ -352,6 +407,7 @@ public interface DatabaseOrBuilder * @return The earliestVersionTime. */ com.google.protobuf.Timestamp getEarliestVersionTime(); + /** * * @@ -386,6 +442,7 @@ public interface DatabaseOrBuilder * @return The enum numeric value on the wire for pointInTimeRecoveryEnablement. */ int getPointInTimeRecoveryEnablementValue(); + /** * * @@ -416,6 +473,7 @@ public interface DatabaseOrBuilder * @return The enum numeric value on the wire for appEngineIntegrationMode. */ int getAppEngineIntegrationModeValue(); + /** * * @@ -436,8 +494,8 @@ public interface DatabaseOrBuilder * *
    * Output only. The key_prefix for this database. This key_prefix is used, in
-   * combination with the project id ("<key prefix>~<project id>") to construct
-   * the application id that is returned from the Cloud Datastore APIs in Google
+   * combination with the project ID ("<key prefix>~<project id>") to construct
+   * the application ID that is returned from the Cloud Datastore APIs in Google
    * App Engine first generation runtimes.
    *
    * This value may be empty in which case the appid to use for URL-encoded keys
@@ -449,13 +507,14 @@ public interface DatabaseOrBuilder
    * @return The keyPrefix.
    */
   java.lang.String getKeyPrefix();
+
   /**
    *
    *
    * 
    * Output only. The key_prefix for this database. This key_prefix is used, in
-   * combination with the project id ("<key prefix>~<project id>") to construct
-   * the application id that is returned from the Cloud Datastore APIs in Google
+   * combination with the project ID ("<key prefix>~<project id>") to construct
+   * the application ID that is returned from the Cloud Datastore APIs in Google
    * App Engine first generation runtimes.
    *
    * This value may be empty in which case the appid to use for URL-encoded keys
@@ -481,6 +540,7 @@ public interface DatabaseOrBuilder
    * @return The enum numeric value on the wire for deleteProtectionState.
    */
   int getDeleteProtectionStateValue();
+
   /**
    *
    *
@@ -495,6 +555,254 @@ public interface DatabaseOrBuilder
    */
   com.google.firestore.admin.v1.Database.DeleteProtectionState getDeleteProtectionState();
 
+  /**
+   *
+   *
+   * 
+   * Optional. Presence indicates CMEK is enabled for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cmekConfig field is set. + */ + boolean hasCmekConfig(); + + /** + * + * + *
+   * Optional. Presence indicates CMEK is enabled for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cmekConfig. + */ + com.google.firestore.admin.v1.Database.CmekConfig getCmekConfig(); + + /** + * + * + *
+   * Optional. Presence indicates CMEK is enabled for this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.admin.v1.Database.CmekConfigOrBuilder getCmekConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The database resource's prior database ID. This field is only
+   * populated for deleted databases.
+   * 
+ * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The previousId. + */ + java.lang.String getPreviousId(); + + /** + * + * + *
+   * Output only. The database resource's prior database ID. This field is only
+   * populated for deleted databases.
+   * 
+ * + * string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for previousId. + */ + com.google.protobuf.ByteString getPreviousIdBytes(); + + /** + * + * + *
+   * Output only. Information about the provenance of this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the sourceInfo field is set. + */ + boolean hasSourceInfo(); + + /** + * + * + *
+   * Output only. Information about the provenance of this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sourceInfo. + */ + com.google.firestore.admin.v1.Database.SourceInfo getSourceInfo(); + + /** + * + * + *
+   * Output only. Information about the provenance of this database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.firestore.admin.v1.Database.SourceInfoOrBuilder getSourceInfoOrBuilder(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsTags(java.lang.String key); + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getTagsMap(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getTagsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Background: Free tier is the ability of a Firestore database
+   * to use a small amount of resources every day without being charged. Once
+   * usage exceeds the free tier limit further usage is charged.
+   *
+   * Whether this database can make use of the free tier. Only one database
+   * per project can be eligible for the free tier.
+   *
+   * The first (or next) database that is created in a project without a free
+   * tier database will be marked as eligible for the free tier. Databases that
+   * are created while there is a free tier database will not be eligible for
+   * the free tier.
+   * 
+ * + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the freeTier field is set. + */ + boolean hasFreeTier(); + + /** + * + * + *
+   * Output only. Background: Free tier is the ability of a Firestore database
+   * to use a small amount of resources every day without being charged. Once
+   * usage exceeds the free tier limit further usage is charged.
+   *
+   * Whether this database can make use of the free tier. Only one database
+   * per project can be eligible for the free tier.
+   *
+   * The first (or next) database that is created in a project without a free
+   * tier database will be marked as eligible for the free tier. Databases that
+   * are created while there is a free tier database will not be eligible for
+   * the free tier.
+   * 
+ * + * optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The freeTier. + */ + boolean getFreeTier(); + /** * * @@ -509,6 +817,7 @@ public interface DatabaseOrBuilder * @return The etag. */ java.lang.String getEtag(); + /** * * @@ -523,4 +832,34 @@ public interface DatabaseOrBuilder * @return The bytes for etag. */ com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Immutable. The edition of the database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for databaseEdition. + */ + int getDatabaseEditionValue(); + + /** + * + * + *
+   * Immutable. The edition of the database.
+   * 
+ * + * + * .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The databaseEdition. + */ + com.google.firestore.admin.v1.Database.DatabaseEdition getDatabaseEdition(); } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseProto.java index c05bc59b5..cc4178fc6 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/database.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class DatabaseProto { @@ -32,6 +32,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_admin_v1_Database_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_admin_v1_Database_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_CmekConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_CmekConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_SourceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_SourceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Database_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Database_TagsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -45,50 +77,87 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\022\031google.firestore.admin.v1\032\037google/ap" + "i/field_behavior.proto\032\031google/api/resou" + "rce.proto\032\036google/protobuf/duration.prot" - + "o\032\037google/protobuf/timestamp.proto\"\271\013\n\010D" + + "o\032\037google/protobuf/timestamp.proto\"\243\026\n\010D" + "atabase\022\014\n\004name\030\001 \001(\t\022\020\n\003uid\030\003 \001(\tB\003\340A\003\022" + "4\n\013create_time\030\005 \001(\0132\032.google.protobuf.T" + "imestampB\003\340A\003\0224\n\013update_time\030\006 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\022\023\n\013location_" - + "id\030\t \001(\t\022>\n\004type\030\n \001(\01620.google.firestor" - + "e.admin.v1.Database.DatabaseType\022M\n\020conc" - + "urrency_mode\030\017 \001(\01623.google.firestore.ad" - + "min.v1.Database.ConcurrencyMode\022@\n\030versi" - + "on_retention_period\030\021 \001(\0132\031.google.proto" - + "buf.DurationB\003\340A\003\022>\n\025earliest_version_ti" - + "me\030\022 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\022l\n!point_in_time_recovery_enablement\030\025" - + " \001(\0162A.google.firestore.admin.v1.Databas" - + "e.PointInTimeRecoveryEnablement\022a\n\033app_e" - + "ngine_integration_mode\030\023 \001(\0162<.google.fi" - + "restore.admin.v1.Database.AppEngineInteg" - + "rationMode\022\027\n\nkey_prefix\030\024 \001(\tB\003\340A\003\022Z\n\027d" - + "elete_protection_state\030\026 \001(\01629.google.fi" - + "restore.admin.v1.Database.DeleteProtecti" - + "onState\022\014\n\004etag\030c \001(\t\"W\n\014DatabaseType\022\035\n" - + "\031DATABASE_TYPE_UNSPECIFIED\020\000\022\024\n\020FIRESTOR" - + "E_NATIVE\020\001\022\022\n\016DATASTORE_MODE\020\002\"w\n\017Concur" - + "rencyMode\022 \n\034CONCURRENCY_MODE_UNSPECIFIE" - + "D\020\000\022\016\n\nOPTIMISTIC\020\001\022\017\n\013PESSIMISTIC\020\002\022!\n\035" - + "OPTIMISTIC_WITH_ENTITY_GROUPS\020\003\"\233\001\n\035Poin" - + "tInTimeRecoveryEnablement\0221\n-POINT_IN_TI" - + "ME_RECOVERY_ENABLEMENT_UNSPECIFIED\020\000\022\"\n\036" - + "POINT_IN_TIME_RECOVERY_ENABLED\020\001\022#\n\037POIN" - + "T_IN_TIME_RECOVERY_DISABLED\020\002\"b\n\030AppEngi" - + "neIntegrationMode\022+\n\'APP_ENGINE_INTEGRAT" - + "ION_MODE_UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010D" - + "ISABLED\020\002\"\177\n\025DeleteProtectionState\022\'\n#DE" - + "LETE_PROTECTION_STATE_UNSPECIFIED\020\000\022\036\n\032D" - + "ELETE_PROTECTION_DISABLED\020\001\022\035\n\031DELETE_PR" - + "OTECTION_ENABLED\020\002:R\352AO\n!firestore.googl" - + "eapis.com/Database\022\'projects/{project}/d" - + "atabases/{database}R\001\001B\334\001\n\035com.google.fi" - + "restore.admin.v1B\rDatabaseProtoP\001Z9cloud" - + ".google.com/go/firestore/apiv1/admin/adm" - + "inpb;adminpb\242\002\004GCFS\252\002\037Google.Cloud.Fires" - + "tore.Admin.V1\312\002\037Google\\Cloud\\Firestore\\A" - + "dmin\\V1\352\002#Google::Cloud::Firestore::Admi" - + "n::V1b\006proto3" + + "gle.protobuf.TimestampB\003\340A\003\0224\n\013delete_ti" + + "me\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\022\023\n\013location_id\030\t \001(\t\022>\n\004type\030\n \001(\01620.g" + + "oogle.firestore.admin.v1.Database.Databa" + + "seType\022M\n\020concurrency_mode\030\017 \001(\01623.googl" + + "e.firestore.admin.v1.Database.Concurrenc" + + "yMode\022@\n\030version_retention_period\030\021 \001(\0132" + + "\031.google.protobuf.DurationB\003\340A\003\022>\n\025earli" + + "est_version_time\030\022 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022l\n!point_in_time_recover" + + "y_enablement\030\025 \001(\0162A.google.firestore.ad" + + "min.v1.Database.PointInTimeRecoveryEnabl" + + "ement\022a\n\033app_engine_integration_mode\030\023 \001" + + "(\0162<.google.firestore.admin.v1.Database." + + "AppEngineIntegrationMode\022\027\n\nkey_prefix\030\024" + + " \001(\tB\003\340A\003\022Z\n\027delete_protection_state\030\026 \001" + + "(\01629.google.firestore.admin.v1.Database." + + "DeleteProtectionState\022H\n\013cmek_config\030\027 \001" + + "(\0132..google.firestore.admin.v1.Database." + + "CmekConfigB\003\340A\001\022\030\n\013previous_id\030\031 \001(\tB\003\340A" + + "\003\022H\n\013source_info\030\032 \001(\0132..google.firestor" + + "e.admin.v1.Database.SourceInfoB\003\340A\003\022F\n\004t" + + "ags\030\035 \003(\0132-.google.firestore.admin.v1.Da" + + "tabase.TagsEntryB\t\340A\004\340A\005\340A\001\022\033\n\tfree_tier" + + "\030\036 \001(\010B\003\340A\003H\000\210\001\001\022\014\n\004etag\030c \001(\t\022R\n\020databa" + + "se_edition\030\034 \001(\01623.google.firestore.admi" + + "n.v1.Database.DatabaseEditionB\003\340A\005\032H\n\nCm" + + "ekConfig\022\031\n\014kms_key_name\030\001 \001(\tB\003\340A\002\022\037\n\022a" + + "ctive_key_version\030\002 \003(\tB\003\340A\003\032\347\001\n\nSourceI" + + "nfo\022M\n\006backup\030\001 \001(\0132;.google.firestore.a" + + "dmin.v1.Database.SourceInfo.BackupSource" + + "H\000\022:\n\toperation\030\003 \001(\tB\'\372A$\n\"firestore.go" + + "ogleapis.com/Operation\032D\n\014BackupSource\0224" + + "\n\006backup\030\001 \001(\tB$\372A!\n\037firestore.googleapi" + + "s.com/BackupB\010\n\006source\032\210\004\n\020EncryptionCon" + + "fig\022x\n\031google_default_encryption\030\001 \001(\0132S" + + ".google.firestore.admin.v1.Database.Encr" + + "yptionConfig.GoogleDefaultEncryptionOpti" + + "onsH\000\022m\n\025use_source_encryption\030\002 \001(\0132L.g" + + "oogle.firestore.admin.v1.Database.Encryp" + + "tionConfig.SourceEncryptionOptionsH\000\022|\n\033" + + "customer_managed_encryption\030\003 \001(\0132U.goog" + + "le.firestore.admin.v1.Database.Encryptio" + + "nConfig.CustomerManagedEncryptionOptions" + + "H\000\032 \n\036GoogleDefaultEncryptionOptions\032\031\n\027" + + "SourceEncryptionOptions\032=\n CustomerManag" + + "edEncryptionOptions\022\031\n\014kms_key_name\030\001 \001(" + + "\tB\003\340A\002B\021\n\017encryption_type\032+\n\tTagsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"W\n\014Databa" + + "seType\022\035\n\031DATABASE_TYPE_UNSPECIFIED\020\000\022\024\n" + + "\020FIRESTORE_NATIVE\020\001\022\022\n\016DATASTORE_MODE\020\002\"" + + "w\n\017ConcurrencyMode\022 \n\034CONCURRENCY_MODE_U" + + "NSPECIFIED\020\000\022\016\n\nOPTIMISTIC\020\001\022\017\n\013PESSIMIS" + + "TIC\020\002\022!\n\035OPTIMISTIC_WITH_ENTITY_GROUPS\020\003" + + "\"\233\001\n\035PointInTimeRecoveryEnablement\0221\n-PO" + + "INT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIF" + + "IED\020\000\022\"\n\036POINT_IN_TIME_RECOVERY_ENABLED\020" + + "\001\022#\n\037POINT_IN_TIME_RECOVERY_DISABLED\020\002\"b" + + "\n\030AppEngineIntegrationMode\022+\n\'APP_ENGINE" + + "_INTEGRATION_MODE_UNSPECIFIED\020\000\022\013\n\007ENABL" + + "ED\020\001\022\014\n\010DISABLED\020\002\"\177\n\025DeleteProtectionSt" + + "ate\022\'\n#DELETE_PROTECTION_STATE_UNSPECIFI" + + "ED\020\000\022\036\n\032DELETE_PROTECTION_DISABLED\020\001\022\035\n\031" + + "DELETE_PROTECTION_ENABLED\020\002\"Q\n\017DatabaseE" + + "dition\022 \n\034DATABASE_EDITION_UNSPECIFIED\020\000" + + "\022\014\n\010STANDARD\020\001\022\016\n\nENTERPRISE\020\002:R\352AO\n!fir" + + "estore.googleapis.com/Database\022\'projects" + + "/{project}/databases/{database}R\001\001B\014\n\n_f" + + "ree_tierB\303\002\n\035com.google.firestore.admin." + + "v1B\rDatabaseProtoP\001Z9cloud.google.com/go" + + "/firestore/apiv1/admin/adminpb;adminpb\242\002" + + "\004GCFS\252\002\037Google.Cloud.Firestore.Admin.V1\312" + + "\002\037Google\\Cloud\\Firestore\\Admin\\V1\352\002#Goog" + + "le::Cloud::Firestore::Admin::V1\352Ad\n\"fire" + + "store.googleapis.com/Operation\022>projects" + + "/{project}/databases/{database}/operatio" + + "ns/{operation}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -109,6 +178,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uid", "CreateTime", "UpdateTime", + "DeleteTime", "LocationId", "Type", "ConcurrencyMode", @@ -118,12 +188,91 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AppEngineIntegrationMode", "KeyPrefix", "DeleteProtectionState", + "CmekConfig", + "PreviousId", + "SourceInfo", + "Tags", + "FreeTier", "Etag", + "DatabaseEdition", + }); + internal_static_google_firestore_admin_v1_Database_CmekConfig_descriptor = + internal_static_google_firestore_admin_v1_Database_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_admin_v1_Database_CmekConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_CmekConfig_descriptor, + new java.lang.String[] { + "KmsKeyName", "ActiveKeyVersion", + }); + internal_static_google_firestore_admin_v1_Database_SourceInfo_descriptor = + internal_static_google_firestore_admin_v1_Database_descriptor.getNestedTypes().get(1); + internal_static_google_firestore_admin_v1_Database_SourceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_SourceInfo_descriptor, + new java.lang.String[] { + "Backup", "Operation", "Source", + }); + internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_descriptor = + internal_static_google_firestore_admin_v1_Database_SourceInfo_descriptor + .getNestedTypes() + .get(0); + internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_SourceInfo_BackupSource_descriptor, + new java.lang.String[] { + "Backup", + }); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor = + internal_static_google_firestore_admin_v1_Database_descriptor.getNestedTypes().get(2); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor, + new java.lang.String[] { + "GoogleDefaultEncryption", + "UseSourceEncryption", + "CustomerManagedEncryption", + "EncryptionType", + }); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_descriptor = + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_GoogleDefaultEncryptionOptions_descriptor, + new java.lang.String[] {}); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_descriptor = + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_SourceEncryptionOptions_descriptor, + new java.lang.String[] {}); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_descriptor = + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_EncryptionConfig_CustomerManagedEncryptionOptions_descriptor, + new java.lang.String[] { + "KmsKeyName", + }); + internal_static_google_firestore_admin_v1_Database_TagsEntry_descriptor = + internal_static_google_firestore_admin_v1_Database_descriptor.getNestedTypes().get(3); + internal_static_google_firestore_admin_v1_Database_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Database_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequest.java index 112572a0d..1ef6371bd 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DeleteBackupRequest) DeleteBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteBackupRequest.newBuilder() to construct. private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -282,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -467,6 +471,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -493,6 +498,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -519,6 +525,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -544,6 +551,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -565,6 +573,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequestOrBuilder.java index 790ba2bb2..ade42dbea 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface DeleteBackupRequestOrBuilder @@ -40,6 +40,7 @@ public interface DeleteBackupRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequest.java index 5fc48b2a0..565437e4b 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -33,6 +33,7 @@ public final class DeleteBackupScheduleRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DeleteBackupScheduleRequest) DeleteBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteBackupScheduleRequest.newBuilder() to construct. private DeleteBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -284,6 +287,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -468,6 +472,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -495,6 +500,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -522,6 +528,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -548,6 +555,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -570,6 +578,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequestOrBuilder.java index 4bff0493b..313792a28 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteBackupScheduleRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface DeleteBackupScheduleRequestOrBuilder @@ -41,6 +41,7 @@ public interface DeleteBackupScheduleRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadata.java index f5d292f26..e63ef31d0 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -33,6 +33,7 @@ public final class DeleteDatabaseMetadata extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DeleteDatabaseMetadata) DeleteDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteDatabaseMetadata.newBuilder() to construct. private DeleteDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -211,6 +212,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadataOrBuilder.java index d99f94f9f..b7845d846 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface DeleteDatabaseMetadataOrBuilder diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequest.java index 60503d024..7ef9729cd 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class DeleteDatabaseRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DeleteDatabaseRequest) DeleteDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteDatabaseRequest.newBuilder() to construct. private DeleteDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; + /** * * @@ -151,6 +155,7 @@ public java.lang.String getEtag() { return s; } } + /** * * @@ -345,6 +350,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -545,6 +551,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -570,6 +577,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -595,6 +603,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -619,6 +628,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -639,6 +649,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -666,6 +677,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object etag_ = ""; + /** * * @@ -690,6 +702,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -714,6 +727,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -737,6 +751,7 @@ public Builder setEtag(java.lang.String value) { onChanged(); return this; } + /** * * @@ -756,6 +771,7 @@ public Builder clearEtag() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequestOrBuilder.java index a322dac69..14f37cf44 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteDatabaseRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface DeleteDatabaseRequestOrBuilder @@ -39,6 +39,7 @@ public interface DeleteDatabaseRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +70,7 @@ public interface DeleteDatabaseRequestOrBuilder * @return The etag. */ java.lang.String getEtag(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java index 3841fb14c..656052f74 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class DeleteIndexRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DeleteIndexRequest) DeleteIndexRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteIndexRequest.newBuilder() to construct. private DeleteIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -280,6 +283,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -465,6 +469,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -490,6 +495,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -515,6 +521,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -539,6 +546,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -559,6 +567,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.java index a9bfd0270..050ef5952 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface DeleteIndexRequestOrBuilder @@ -39,6 +39,7 @@ public interface DeleteIndexRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteUserCredsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteUserCredsRequest.java new file mode 100644 index 000000000..6ba623ef4 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteUserCredsRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.DeleteUserCreds][google.firestore.admin.v1.FirestoreAdmin.DeleteUserCreds].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.DeleteUserCredsRequest} + */ +public final class DeleteUserCredsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DeleteUserCredsRequest) + DeleteUserCredsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteUserCredsRequest.newBuilder() to construct. + private DeleteUserCredsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteUserCredsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteUserCredsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.DeleteUserCredsRequest.class, + com.google.firestore.admin.v1.DeleteUserCredsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.DeleteUserCredsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.DeleteUserCredsRequest other = + (com.google.firestore.admin.v1.DeleteUserCredsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.DeleteUserCredsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [FirestoreAdmin.DeleteUserCreds][google.firestore.admin.v1.FirestoreAdmin.DeleteUserCreds].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.DeleteUserCredsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.DeleteUserCredsRequest) + com.google.firestore.admin.v1.DeleteUserCredsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.DeleteUserCredsRequest.class, + com.google.firestore.admin.v1.DeleteUserCredsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.DeleteUserCredsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteUserCredsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.DeleteUserCredsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteUserCredsRequest build() { + com.google.firestore.admin.v1.DeleteUserCredsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteUserCredsRequest buildPartial() { + com.google.firestore.admin.v1.DeleteUserCredsRequest result = + new com.google.firestore.admin.v1.DeleteUserCredsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.DeleteUserCredsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.DeleteUserCredsRequest) { + return mergeFrom((com.google.firestore.admin.v1.DeleteUserCredsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.DeleteUserCredsRequest other) { + if (other == com.google.firestore.admin.v1.DeleteUserCredsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.DeleteUserCredsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.DeleteUserCredsRequest) + private static final com.google.firestore.admin.v1.DeleteUserCredsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.DeleteUserCredsRequest(); + } + + public static com.google.firestore.admin.v1.DeleteUserCredsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteUserCredsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteUserCredsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteUserCredsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteUserCredsRequestOrBuilder.java new file mode 100644 index 000000000..a520b6687 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteUserCredsRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface DeleteUserCredsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.DeleteUserCredsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DisableUserCredsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DisableUserCredsRequest.java new file mode 100644 index 000000000..9a0480c12 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DisableUserCredsRequest.java @@ -0,0 +1,658 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.DisableUserCreds][google.firestore.admin.v1.FirestoreAdmin.DisableUserCreds].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.DisableUserCredsRequest} + */ +public final class DisableUserCredsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DisableUserCredsRequest) + DisableUserCredsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DisableUserCredsRequest.newBuilder() to construct. + private DisableUserCredsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DisableUserCredsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DisableUserCredsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DisableUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DisableUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.DisableUserCredsRequest.class, + com.google.firestore.admin.v1.DisableUserCredsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.DisableUserCredsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.DisableUserCredsRequest other = + (com.google.firestore.admin.v1.DisableUserCredsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.DisableUserCredsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [FirestoreAdmin.DisableUserCreds][google.firestore.admin.v1.FirestoreAdmin.DisableUserCreds].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.DisableUserCredsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.DisableUserCredsRequest) + com.google.firestore.admin.v1.DisableUserCredsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DisableUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DisableUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.DisableUserCredsRequest.class, + com.google.firestore.admin.v1.DisableUserCredsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.DisableUserCredsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DisableUserCredsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DisableUserCredsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.DisableUserCredsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.DisableUserCredsRequest build() { + com.google.firestore.admin.v1.DisableUserCredsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DisableUserCredsRequest buildPartial() { + com.google.firestore.admin.v1.DisableUserCredsRequest result = + new com.google.firestore.admin.v1.DisableUserCredsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.DisableUserCredsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.DisableUserCredsRequest) { + return mergeFrom((com.google.firestore.admin.v1.DisableUserCredsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.DisableUserCredsRequest other) { + if (other == com.google.firestore.admin.v1.DisableUserCredsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.DisableUserCredsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.DisableUserCredsRequest) + private static final com.google.firestore.admin.v1.DisableUserCredsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.DisableUserCredsRequest(); + } + + public static com.google.firestore.admin.v1.DisableUserCredsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisableUserCredsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DisableUserCredsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DisableUserCredsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DisableUserCredsRequestOrBuilder.java new file mode 100644 index 000000000..c2e40850a --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DisableUserCredsRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface DisableUserCredsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.DisableUserCredsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/EnableUserCredsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/EnableUserCredsRequest.java new file mode 100644 index 000000000..530b4fc52 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/EnableUserCredsRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.EnableUserCreds][google.firestore.admin.v1.FirestoreAdmin.EnableUserCreds].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.EnableUserCredsRequest} + */ +public final class EnableUserCredsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.EnableUserCredsRequest) + EnableUserCredsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use EnableUserCredsRequest.newBuilder() to construct. + private EnableUserCredsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnableUserCredsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnableUserCredsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_EnableUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_EnableUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.EnableUserCredsRequest.class, + com.google.firestore.admin.v1.EnableUserCredsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.EnableUserCredsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.EnableUserCredsRequest other = + (com.google.firestore.admin.v1.EnableUserCredsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.EnableUserCredsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [FirestoreAdmin.EnableUserCreds][google.firestore.admin.v1.FirestoreAdmin.EnableUserCreds].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.EnableUserCredsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.EnableUserCredsRequest) + com.google.firestore.admin.v1.EnableUserCredsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_EnableUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_EnableUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.EnableUserCredsRequest.class, + com.google.firestore.admin.v1.EnableUserCredsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.EnableUserCredsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_EnableUserCredsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.EnableUserCredsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.EnableUserCredsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.EnableUserCredsRequest build() { + com.google.firestore.admin.v1.EnableUserCredsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.EnableUserCredsRequest buildPartial() { + com.google.firestore.admin.v1.EnableUserCredsRequest result = + new com.google.firestore.admin.v1.EnableUserCredsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.EnableUserCredsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.EnableUserCredsRequest) { + return mergeFrom((com.google.firestore.admin.v1.EnableUserCredsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.EnableUserCredsRequest other) { + if (other == com.google.firestore.admin.v1.EnableUserCredsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.EnableUserCredsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.EnableUserCredsRequest) + private static final com.google.firestore.admin.v1.EnableUserCredsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.EnableUserCredsRequest(); + } + + public static com.google.firestore.admin.v1.EnableUserCredsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnableUserCredsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.EnableUserCredsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/EnableUserCredsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/EnableUserCredsRequestOrBuilder.java new file mode 100644 index 000000000..6887f3236 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/EnableUserCredsRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface EnableUserCredsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.EnableUserCredsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java index a13fec548..f40d248e6 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -35,6 +35,7 @@ public final class ExportDocumentsMetadata extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ExportDocumentsMetadata) ExportDocumentsMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use ExportDocumentsMetadata.newBuilder() to construct. private ExportDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int START_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -86,6 +88,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -101,6 +104,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -117,6 +121,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -133,6 +138,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -149,6 +155,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -166,6 +173,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int OPERATION_STATE_FIELD_NUMBER = 3; private int operationState_ = 0; + /** * * @@ -181,6 +189,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -201,6 +210,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 4; private com.google.firestore.admin.v1.Progress progressDocuments_; + /** * * @@ -216,6 +226,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -233,6 +244,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressDocuments_; } + /** * * @@ -251,6 +263,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public static final int PROGRESS_BYTES_FIELD_NUMBER = 5; private com.google.firestore.admin.v1.Progress progressBytes_; + /** * * @@ -266,6 +279,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -283,6 +297,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressBytes_; } + /** * * @@ -304,11 +319,12 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -318,11 +334,12 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder public com.google.protobuf.ProtocolStringList getCollectionIdsList() { return collectionIds_; } + /** * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -332,11 +349,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -347,11 +365,12 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -367,6 +386,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object outputUriPrefix_ = ""; + /** * * @@ -390,6 +410,7 @@ public java.lang.String getOutputUriPrefix() { return s; } } + /** * * @@ -419,11 +440,12 @@ public com.google.protobuf.ByteString getOutputUriPrefixBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -433,11 +455,12 @@ public com.google.protobuf.ByteString getOutputUriPrefixBytes() { public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { return namespaceIds_; } + /** * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -447,11 +470,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -462,11 +486,12 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -480,6 +505,7 @@ public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { public static final int SNAPSHOT_TIME_FIELD_NUMBER = 9; private com.google.protobuf.Timestamp snapshotTime_; + /** * * @@ -497,6 +523,7 @@ public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -516,6 +543,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { ? com.google.protobuf.Timestamp.getDefaultInstance() : snapshotTime_; } + /** * * @@ -807,6 +835,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1166,6 +1195,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -1180,6 +1210,7 @@ public Builder mergeFrom( public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1198,6 +1229,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -1220,6 +1252,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1239,6 +1272,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1266,6 +1300,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1285,6 +1320,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1299,6 +1335,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1315,6 +1352,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1347,6 +1385,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1362,6 +1401,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1381,6 +1421,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1404,6 +1445,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1424,6 +1466,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1452,6 +1495,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1472,6 +1516,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1487,6 +1532,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1504,6 +1550,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1532,6 +1579,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private int operationState_ = 0; + /** * * @@ -1547,6 +1595,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -1565,6 +1614,7 @@ public Builder setOperationStateValue(int value) { onChanged(); return this; } + /** * * @@ -1582,6 +1632,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { com.google.firestore.admin.v1.OperationState.forNumber(operationState_); return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; } + /** * * @@ -1603,6 +1654,7 @@ public Builder setOperationState(com.google.firestore.admin.v1.OperationState va onChanged(); return this; } + /** * * @@ -1627,6 +1679,7 @@ public Builder clearOperationState() { com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressDocumentsBuilder_; + /** * * @@ -1641,6 +1694,7 @@ public Builder clearOperationState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1661,6 +1715,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocumentsBuilder_.getMessage(); } } + /** * * @@ -1683,6 +1738,7 @@ public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value onChanged(); return this; } + /** * * @@ -1703,6 +1759,7 @@ public Builder setProgressDocuments( onChanged(); return this; } + /** * * @@ -1730,6 +1787,7 @@ public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress val } return this; } + /** * * @@ -1749,6 +1807,7 @@ public Builder clearProgressDocuments() { onChanged(); return this; } + /** * * @@ -1763,6 +1822,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilde onChanged(); return getProgressDocumentsFieldBuilder().getBuilder(); } + /** * * @@ -1781,6 +1841,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui : progressDocuments_; } } + /** * * @@ -1813,6 +1874,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressBytesBuilder_; + /** * * @@ -1827,6 +1889,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1847,6 +1910,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytesBuilder_.getMessage(); } } + /** * * @@ -1869,6 +1933,7 @@ public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { onChanged(); return this; } + /** * * @@ -1889,6 +1954,7 @@ public Builder setProgressBytes( onChanged(); return this; } + /** * * @@ -1916,6 +1982,7 @@ public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) } return this; } + /** * * @@ -1935,6 +2002,7 @@ public Builder clearProgressBytes() { onChanged(); return this; } + /** * * @@ -1949,6 +2017,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() onChanged(); return getProgressBytesFieldBuilder().getBuilder(); } + /** * * @@ -1967,6 +2036,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder : progressBytes_; } } + /** * * @@ -2002,11 +2072,12 @@ private void ensureCollectionIdsIsMutable() { } bitField0_ |= 0x00000020; } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2017,11 +2088,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { collectionIds_.makeImmutable(); return collectionIds_; } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2031,11 +2103,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2046,11 +2119,12 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2061,11 +2135,12 @@ public java.lang.String getCollectionIds(int index) { public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { return collectionIds_.getByteString(index); } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2084,11 +2159,12 @@ public Builder setCollectionIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2106,11 +2182,12 @@ public Builder addCollectionIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2125,11 +2202,12 @@ public Builder addAllCollectionIds(java.lang.Iterable values) onChanged(); return this; } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2143,11 +2221,12 @@ public Builder clearCollectionIds() { onChanged(); return this; } + /** * * *
-     * Which collection ids are being exported.
+     * Which collection IDs are being exported.
      * 
* * repeated string collection_ids = 6; @@ -2168,6 +2247,7 @@ public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object outputUriPrefix_ = ""; + /** * * @@ -2190,6 +2270,7 @@ public java.lang.String getOutputUriPrefix() { return (java.lang.String) ref; } } + /** * * @@ -2212,6 +2293,7 @@ public com.google.protobuf.ByteString getOutputUriPrefixBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2233,6 +2315,7 @@ public Builder setOutputUriPrefix(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2250,6 +2333,7 @@ public Builder clearOutputUriPrefix() { onChanged(); return this; } + /** * * @@ -2282,11 +2366,12 @@ private void ensureNamespaceIdsIsMutable() { } bitField0_ |= 0x00000080; } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2297,11 +2382,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { namespaceIds_.makeImmutable(); return namespaceIds_; } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2311,11 +2397,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2326,11 +2413,12 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2341,11 +2429,12 @@ public java.lang.String getNamespaceIds(int index) { public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { return namespaceIds_.getByteString(index); } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2364,11 +2453,12 @@ public Builder setNamespaceIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2386,11 +2476,12 @@ public Builder addNamespaceIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2405,11 +2496,12 @@ public Builder addAllNamespaceIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2423,11 +2515,12 @@ public Builder clearNamespaceIds() { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being exported.
+     * Which namespace IDs are being exported.
      * 
* * repeated string namespace_ids = 8; @@ -2453,6 +2546,7 @@ public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> snapshotTimeBuilder_; + /** * * @@ -2469,6 +2563,7 @@ public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -2491,6 +2586,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { return snapshotTimeBuilder_.getMessage(); } } + /** * * @@ -2515,6 +2611,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2536,6 +2633,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp.Builder builderForV onChanged(); return this; } + /** * * @@ -2565,6 +2663,7 @@ public Builder mergeSnapshotTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2586,6 +2685,7 @@ public Builder clearSnapshotTime() { onChanged(); return this; } + /** * * @@ -2602,6 +2702,7 @@ public com.google.protobuf.Timestamp.Builder getSnapshotTimeBuilder() { onChanged(); return getSnapshotTimeFieldBuilder().getBuilder(); } + /** * * @@ -2622,6 +2723,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { : snapshotTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.java index 09a9a111b..7a8dcbe49 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ExportDocumentsMetadataOrBuilder @@ -36,6 +36,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -48,6 +49,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -72,6 +74,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -85,6 +88,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -109,6 +113,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return The enum numeric value on the wire for operationState. */ int getOperationStateValue(); + /** * * @@ -134,6 +139,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return Whether the progressDocuments field is set. */ boolean hasProgressDocuments(); + /** * * @@ -146,6 +152,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return The progressDocuments. */ com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** * * @@ -169,6 +176,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return Whether the progressBytes field is set. */ boolean hasProgressBytes(); + /** * * @@ -181,6 +189,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return The progressBytes. */ com.google.firestore.admin.v1.Progress getProgressBytes(); + /** * * @@ -196,7 +205,7 @@ public interface ExportDocumentsMetadataOrBuilder * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -204,11 +213,12 @@ public interface ExportDocumentsMetadataOrBuilder * @return A list containing the collectionIds. */ java.util.List getCollectionIdsList(); + /** * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -216,11 +226,12 @@ public interface ExportDocumentsMetadataOrBuilder * @return The count of collectionIds. */ int getCollectionIdsCount(); + /** * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -229,11 +240,12 @@ public interface ExportDocumentsMetadataOrBuilder * @return The collectionIds at the given index. */ java.lang.String getCollectionIds(int index); + /** * * *
-   * Which collection ids are being exported.
+   * Which collection IDs are being exported.
    * 
* * repeated string collection_ids = 6; @@ -255,6 +267,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return The outputUriPrefix. */ java.lang.String getOutputUriPrefix(); + /** * * @@ -272,7 +285,7 @@ public interface ExportDocumentsMetadataOrBuilder * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -280,11 +293,12 @@ public interface ExportDocumentsMetadataOrBuilder * @return A list containing the namespaceIds. */ java.util.List getNamespaceIdsList(); + /** * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -292,11 +306,12 @@ public interface ExportDocumentsMetadataOrBuilder * @return The count of namespaceIds. */ int getNamespaceIdsCount(); + /** * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -305,11 +320,12 @@ public interface ExportDocumentsMetadataOrBuilder * @return The namespaceIds at the given index. */ java.lang.String getNamespaceIds(int index); + /** * * *
-   * Which namespace ids are being exported.
+   * Which namespace IDs are being exported.
    * 
* * repeated string namespace_ids = 8; @@ -333,6 +349,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return Whether the snapshotTime field is set. */ boolean hasSnapshotTime(); + /** * * @@ -347,6 +364,7 @@ public interface ExportDocumentsMetadataOrBuilder * @return The snapshotTime. */ com.google.protobuf.Timestamp getSnapshotTime(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java index 24d5b8f99..c5f278b14 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ExportDocumentsRequest extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ExportDocumentsRequest) ExportDocumentsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ExportDocumentsRequest.newBuilder() to construct. private ExportDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -72,6 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -98,6 +100,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -130,12 +133,13 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -145,12 +149,13 @@ public com.google.protobuf.ByteString getNameBytes() { public com.google.protobuf.ProtocolStringList getCollectionIdsList() { return collectionIds_; } + /** * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -160,12 +165,13 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -176,12 +182,13 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -197,6 +204,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object outputUriPrefix_ = ""; + /** * * @@ -227,6 +235,7 @@ public java.lang.String getOutputUriPrefix() { return s; } } + /** * * @@ -263,6 +272,7 @@ public com.google.protobuf.ByteString getOutputUriPrefixBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -282,6 +292,7 @@ public com.google.protobuf.ByteString getOutputUriPrefixBytes() { public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { return namespaceIds_; } + /** * * @@ -301,6 +312,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * @@ -321,6 +333,7 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * @@ -344,6 +357,7 @@ public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { public static final int SNAPSHOT_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp snapshotTime_; + /** * * @@ -365,6 +379,7 @@ public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -388,6 +403,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { ? com.google.protobuf.Timestamp.getDefaultInstance() : snapshotTime_; } + /** * * @@ -624,6 +640,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -898,6 +915,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -923,6 +941,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -948,6 +967,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -972,6 +992,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -992,6 +1013,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1027,12 +1049,13 @@ private void ensureCollectionIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1043,12 +1066,13 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { collectionIds_.makeImmutable(); return collectionIds_; } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1058,12 +1082,13 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1074,12 +1099,13 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1090,12 +1116,13 @@ public java.lang.String getCollectionIds(int index) { public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { return collectionIds_.getByteString(index); } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1114,12 +1141,13 @@ public Builder setCollectionIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1137,12 +1165,13 @@ public Builder addCollectionIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1157,12 +1186,13 @@ public Builder addAllCollectionIds(java.lang.Iterable values) onChanged(); return this; } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1176,12 +1206,13 @@ public Builder clearCollectionIds() { onChanged(); return this; } + /** * * *
-     * Which collection ids to export. Unspecified means all collections. Each
-     * collection id in this list must be unique.
+     * Which collection IDs to export. Unspecified means all collections. Each
+     * collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1202,6 +1233,7 @@ public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object outputUriPrefix_ = ""; + /** * * @@ -1231,6 +1263,7 @@ public java.lang.String getOutputUriPrefix() { return (java.lang.String) ref; } } + /** * * @@ -1260,6 +1293,7 @@ public com.google.protobuf.ByteString getOutputUriPrefixBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1288,6 +1322,7 @@ public Builder setOutputUriPrefix(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1312,6 +1347,7 @@ public Builder clearOutputUriPrefix() { onChanged(); return this; } + /** * * @@ -1351,6 +1387,7 @@ private void ensureNamespaceIdsIsMutable() { } bitField0_ |= 0x00000008; } + /** * * @@ -1371,6 +1408,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { namespaceIds_.makeImmutable(); return namespaceIds_; } + /** * * @@ -1390,6 +1428,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * @@ -1410,6 +1449,7 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * @@ -1430,6 +1470,7 @@ public java.lang.String getNamespaceIds(int index) { public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { return namespaceIds_.getByteString(index); } + /** * * @@ -1458,6 +1499,7 @@ public Builder setNamespaceIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1485,6 +1527,7 @@ public Builder addNamespaceIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1509,6 +1552,7 @@ public Builder addAllNamespaceIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -1532,6 +1576,7 @@ public Builder clearNamespaceIds() { onChanged(); return this; } + /** * * @@ -1567,6 +1612,7 @@ public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> snapshotTimeBuilder_; + /** * * @@ -1587,6 +1633,7 @@ public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { public boolean hasSnapshotTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1613,6 +1660,7 @@ public com.google.protobuf.Timestamp getSnapshotTime() { return snapshotTimeBuilder_.getMessage(); } } + /** * * @@ -1641,6 +1689,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1666,6 +1715,7 @@ public Builder setSnapshotTime(com.google.protobuf.Timestamp.Builder builderForV onChanged(); return this; } + /** * * @@ -1699,6 +1749,7 @@ public Builder mergeSnapshotTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1724,6 +1775,7 @@ public Builder clearSnapshotTime() { onChanged(); return this; } + /** * * @@ -1744,6 +1796,7 @@ public com.google.protobuf.Timestamp.Builder getSnapshotTimeBuilder() { onChanged(); return getSnapshotTimeFieldBuilder().getBuilder(); } + /** * * @@ -1768,6 +1821,7 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { : snapshotTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java index e8fbce08c..abd985428 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ExportDocumentsRequestOrBuilder @@ -39,6 +39,7 @@ public interface ExportDocumentsRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -59,8 +60,8 @@ public interface ExportDocumentsRequestOrBuilder * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -68,12 +69,13 @@ public interface ExportDocumentsRequestOrBuilder * @return A list containing the collectionIds. */ java.util.List getCollectionIdsList(); + /** * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -81,12 +83,13 @@ public interface ExportDocumentsRequestOrBuilder * @return The count of collectionIds. */ int getCollectionIdsCount(); + /** * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -95,12 +98,13 @@ public interface ExportDocumentsRequestOrBuilder * @return The collectionIds at the given index. */ java.lang.String getCollectionIds(int index); + /** * * *
-   * Which collection ids to export. Unspecified means all collections. Each
-   * collection id in this list must be unique.
+   * Which collection IDs to export. Unspecified means all collections. Each
+   * collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -129,6 +133,7 @@ public interface ExportDocumentsRequestOrBuilder * @return The outputUriPrefix. */ java.lang.String getOutputUriPrefix(); + /** * * @@ -166,6 +171,7 @@ public interface ExportDocumentsRequestOrBuilder * @return A list containing the namespaceIds. */ java.util.List getNamespaceIdsList(); + /** * * @@ -183,6 +189,7 @@ public interface ExportDocumentsRequestOrBuilder * @return The count of namespaceIds. */ int getNamespaceIdsCount(); + /** * * @@ -201,6 +208,7 @@ public interface ExportDocumentsRequestOrBuilder * @return The namespaceIds at the given index. */ java.lang.String getNamespaceIds(int index); + /** * * @@ -238,6 +246,7 @@ public interface ExportDocumentsRequestOrBuilder * @return Whether the snapshotTime field is set. */ boolean hasSnapshotTime(); + /** * * @@ -256,6 +265,7 @@ public interface ExportDocumentsRequestOrBuilder * @return The snapshotTime. */ com.google.protobuf.Timestamp getSnapshotTime(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java index 564098d3a..247f59122 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ExportDocumentsResponse extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ExportDocumentsResponse) ExportDocumentsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ExportDocumentsResponse.newBuilder() to construct. private ExportDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object outputUriPrefix_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getOutputUriPrefix() { return s; } } + /** * * @@ -279,6 +282,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -464,6 +468,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object outputUriPrefix_ = ""; + /** * * @@ -488,6 +493,7 @@ public java.lang.String getOutputUriPrefix() { return (java.lang.String) ref; } } + /** * * @@ -512,6 +518,7 @@ public com.google.protobuf.ByteString getOutputUriPrefixBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -535,6 +542,7 @@ public Builder setOutputUriPrefix(java.lang.String value) { onChanged(); return this; } + /** * * @@ -554,6 +562,7 @@ public Builder clearOutputUriPrefix() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.java index 842726a08..e4d442770 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ExportDocumentsResponseOrBuilder @@ -38,6 +38,7 @@ public interface ExportDocumentsResponseOrBuilder * @return The outputUriPrefix. */ java.lang.String getOutputUriPrefix(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java index d73d9084a..da8dc1a66 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/field.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -26,7 +26,7 @@ * Represents a single field in the database. * * Fields are grouped by their "Collection Group", which represent all - * collections in the database with the same id. + * collections in the database with the same ID. *
* * Protobuf type {@code google.firestore.admin.v1.Field} @@ -36,6 +36,7 @@ public final class Field extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Field) FieldOrBuilder { private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public interface IndexConfigOrBuilder * repeated .google.firestore.admin.v1.Index indexes = 1; */ java.util.List getIndexesList(); + /** * * @@ -91,6 +93,7 @@ public interface IndexConfigOrBuilder * repeated .google.firestore.admin.v1.Index indexes = 1; */ com.google.firestore.admin.v1.Index getIndexes(int index); + /** * * @@ -101,6 +104,7 @@ public interface IndexConfigOrBuilder * repeated .google.firestore.admin.v1.Index indexes = 1; */ int getIndexesCount(); + /** * * @@ -112,6 +116,7 @@ public interface IndexConfigOrBuilder */ java.util.List getIndexesOrBuilderList(); + /** * * @@ -153,6 +158,7 @@ public interface IndexConfigOrBuilder * @return The ancestorField. */ java.lang.String getAncestorField(); + /** * * @@ -186,6 +192,7 @@ public interface IndexConfigOrBuilder */ boolean getReverting(); } + /** * * @@ -200,6 +207,7 @@ public static final class IndexConfig extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Field.IndexConfig) IndexConfigOrBuilder { private static final long serialVersionUID = 0L; + // Use IndexConfig.newBuilder() to construct. private IndexConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -235,6 +243,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List indexes_; + /** * * @@ -248,6 +257,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getIndexesList() { return indexes_; } + /** * * @@ -262,6 +272,7 @@ public java.util.List getIndexesList() { getIndexesOrBuilderList() { return indexes_; } + /** * * @@ -275,6 +286,7 @@ public java.util.List getIndexesList() { public int getIndexesCount() { return indexes_.size(); } + /** * * @@ -288,6 +300,7 @@ public int getIndexesCount() { public com.google.firestore.admin.v1.Index getIndexes(int index) { return indexes_.get(index); } + /** * * @@ -304,6 +317,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde public static final int USES_ANCESTOR_CONFIG_FIELD_NUMBER = 2; private boolean usesAncestorConfig_ = false; + /** * * @@ -326,6 +340,7 @@ public boolean getUsesAncestorConfig() { @SuppressWarnings("serial") private volatile java.lang.Object ancestorField_ = ""; + /** * * @@ -352,6 +367,7 @@ public java.lang.String getAncestorField() { return s; } } + /** * * @@ -381,6 +397,7 @@ public com.google.protobuf.ByteString getAncestorFieldBytes() { public static final int REVERTING_FIELD_NUMBER = 4; private boolean reverting_ = false; + /** * * @@ -590,6 +607,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -895,6 +913,7 @@ public java.util.List getIndexesList() { return indexesBuilder_.getMessageList(); } } + /** * * @@ -911,6 +930,7 @@ public int getIndexesCount() { return indexesBuilder_.getCount(); } } + /** * * @@ -927,6 +947,7 @@ public com.google.firestore.admin.v1.Index getIndexes(int index) { return indexesBuilder_.getMessage(index); } } + /** * * @@ -949,6 +970,7 @@ public Builder setIndexes(int index, com.google.firestore.admin.v1.Index value) } return this; } + /** * * @@ -969,6 +991,7 @@ public Builder setIndexes( } return this; } + /** * * @@ -991,6 +1014,7 @@ public Builder addIndexes(com.google.firestore.admin.v1.Index value) { } return this; } + /** * * @@ -1013,6 +1037,7 @@ public Builder addIndexes(int index, com.google.firestore.admin.v1.Index value) } return this; } + /** * * @@ -1032,6 +1057,7 @@ public Builder addIndexes(com.google.firestore.admin.v1.Index.Builder builderFor } return this; } + /** * * @@ -1052,6 +1078,7 @@ public Builder addIndexes( } return this; } + /** * * @@ -1072,6 +1099,7 @@ public Builder addAllIndexes( } return this; } + /** * * @@ -1091,6 +1119,7 @@ public Builder clearIndexes() { } return this; } + /** * * @@ -1110,6 +1139,7 @@ public Builder removeIndexes(int index) { } return this; } + /** * * @@ -1122,6 +1152,7 @@ public Builder removeIndexes(int index) { public com.google.firestore.admin.v1.Index.Builder getIndexesBuilder(int index) { return getIndexesFieldBuilder().getBuilder(index); } + /** * * @@ -1138,6 +1169,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde return indexesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1155,6 +1187,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde return java.util.Collections.unmodifiableList(indexes_); } } + /** * * @@ -1168,6 +1201,7 @@ public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder() { return getIndexesFieldBuilder() .addBuilder(com.google.firestore.admin.v1.Index.getDefaultInstance()); } + /** * * @@ -1181,6 +1215,7 @@ public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder(int index) return getIndexesFieldBuilder() .addBuilder(index, com.google.firestore.admin.v1.Index.getDefaultInstance()); } + /** * * @@ -1212,6 +1247,7 @@ public java.util.List getIndexesBui } private boolean usesAncestorConfig_; + /** * * @@ -1229,6 +1265,7 @@ public java.util.List getIndexesBui public boolean getUsesAncestorConfig() { return usesAncestorConfig_; } + /** * * @@ -1250,6 +1287,7 @@ public Builder setUsesAncestorConfig(boolean value) { onChanged(); return this; } + /** * * @@ -1271,6 +1309,7 @@ public Builder clearUsesAncestorConfig() { } private java.lang.Object ancestorField_ = ""; + /** * * @@ -1296,6 +1335,7 @@ public java.lang.String getAncestorField() { return (java.lang.String) ref; } } + /** * * @@ -1321,6 +1361,7 @@ public com.google.protobuf.ByteString getAncestorFieldBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1345,6 +1386,7 @@ public Builder setAncestorField(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1365,6 +1407,7 @@ public Builder clearAncestorField() { onChanged(); return this; } + /** * * @@ -1392,6 +1435,7 @@ public Builder setAncestorFieldBytes(com.google.protobuf.ByteString value) { } private boolean reverting_; + /** * * @@ -1411,6 +1455,7 @@ public Builder setAncestorFieldBytes(com.google.protobuf.ByteString value) { public boolean getReverting() { return reverting_; } + /** * * @@ -1434,6 +1479,7 @@ public Builder setReverting(boolean value) { onChanged(); return this; } + /** * * @@ -1539,6 +1585,7 @@ public interface TtlConfigOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -1554,6 +1601,7 @@ public interface TtlConfigOrBuilder */ com.google.firestore.admin.v1.Field.TtlConfig.State getState(); } + /** * * @@ -1575,6 +1623,7 @@ public static final class TtlConfig extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Field.TtlConfig) TtlConfigOrBuilder { private static final long serialVersionUID = 0L; + // Use TtlConfig.newBuilder() to construct. private TtlConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1675,6 +1724,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -1689,6 +1739,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CREATING = 1; */ public static final int CREATING_VALUE = 1; + /** * * @@ -1699,6 +1750,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ACTIVE = 2; */ public static final int ACTIVE_VALUE = 2; + /** * * @@ -1800,6 +1852,7 @@ private State(int value) { public static final int STATE_FIELD_NUMBER = 1; private int state_ = 0; + /** * * @@ -1817,6 +1870,7 @@ private State(int value) { public int getStateValue() { return state_; } + /** * * @@ -2001,6 +2055,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -2193,6 +2248,7 @@ public Builder mergeFrom( private int bitField0_; private int state_ = 0; + /** * * @@ -2210,6 +2266,7 @@ public Builder mergeFrom( public int getStateValue() { return state_; } + /** * * @@ -2230,6 +2287,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -2251,6 +2309,7 @@ public com.google.firestore.admin.v1.Field.TtlConfig.State getState() { ? com.google.firestore.admin.v1.Field.TtlConfig.State.UNRECOGNIZED : result; } + /** * * @@ -2274,6 +2333,7 @@ public Builder setState(com.google.firestore.admin.v1.Field.TtlConfig.State valu onChanged(); return this; } + /** * * @@ -2363,6 +2423,7 @@ public com.google.firestore.admin.v1.Field.TtlConfig getDefaultInstanceForType() @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -2409,6 +2470,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -2458,6 +2520,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int INDEX_CONFIG_FIELD_NUMBER = 2; private com.google.firestore.admin.v1.Field.IndexConfig indexConfig_; + /** * * @@ -2476,6 +2539,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasIndexConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2496,6 +2560,7 @@ public com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig() { ? com.google.firestore.admin.v1.Field.IndexConfig.getDefaultInstance() : indexConfig_; } + /** * * @@ -2517,6 +2582,7 @@ public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOr public static final int TTL_CONFIG_FIELD_NUMBER = 3; private com.google.firestore.admin.v1.Field.TtlConfig ttlConfig_; + /** * * @@ -2534,6 +2600,7 @@ public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOr public boolean hasTtlConfig() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2553,6 +2620,7 @@ public com.google.firestore.admin.v1.Field.TtlConfig getTtlConfig() { ? com.google.firestore.admin.v1.Field.TtlConfig.getDefaultInstance() : ttlConfig_; } + /** * * @@ -2756,6 +2824,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -2763,7 +2832,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Represents a single field in the database. * * Fields are grouped by their "Collection Group", which represent all - * collections in the database with the same id. + * collections in the database with the same ID. *
* * Protobuf type {@code google.firestore.admin.v1.Field} @@ -2990,6 +3059,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -3035,6 +3105,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -3080,6 +3151,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3124,6 +3196,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3164,6 +3237,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -3216,6 +3290,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.firestore.admin.v1.Field.IndexConfig.Builder, com.google.firestore.admin.v1.Field.IndexConfigOrBuilder> indexConfigBuilder_; + /** * * @@ -3233,6 +3308,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasIndexConfig() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3256,6 +3332,7 @@ public com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig() { return indexConfigBuilder_.getMessage(); } } + /** * * @@ -3281,6 +3358,7 @@ public Builder setIndexConfig(com.google.firestore.admin.v1.Field.IndexConfig va onChanged(); return this; } + /** * * @@ -3304,6 +3382,7 @@ public Builder setIndexConfig( onChanged(); return this; } + /** * * @@ -3335,6 +3414,7 @@ public Builder mergeIndexConfig(com.google.firestore.admin.v1.Field.IndexConfig } return this; } + /** * * @@ -3357,6 +3437,7 @@ public Builder clearIndexConfig() { onChanged(); return this; } + /** * * @@ -3374,6 +3455,7 @@ public com.google.firestore.admin.v1.Field.IndexConfig.Builder getIndexConfigBui onChanged(); return getIndexConfigFieldBuilder().getBuilder(); } + /** * * @@ -3395,6 +3477,7 @@ public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOr : indexConfig_; } } + /** * * @@ -3430,6 +3513,7 @@ public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOr com.google.firestore.admin.v1.Field.TtlConfig.Builder, com.google.firestore.admin.v1.Field.TtlConfigOrBuilder> ttlConfigBuilder_; + /** * * @@ -3446,6 +3530,7 @@ public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOr public boolean hasTtlConfig() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3468,6 +3553,7 @@ public com.google.firestore.admin.v1.Field.TtlConfig getTtlConfig() { return ttlConfigBuilder_.getMessage(); } } + /** * * @@ -3492,6 +3578,7 @@ public Builder setTtlConfig(com.google.firestore.admin.v1.Field.TtlConfig value) onChanged(); return this; } + /** * * @@ -3514,6 +3601,7 @@ public Builder setTtlConfig( onChanged(); return this; } + /** * * @@ -3543,6 +3631,7 @@ public Builder mergeTtlConfig(com.google.firestore.admin.v1.Field.TtlConfig valu } return this; } + /** * * @@ -3564,6 +3653,7 @@ public Builder clearTtlConfig() { onChanged(); return this; } + /** * * @@ -3580,6 +3670,7 @@ public com.google.firestore.admin.v1.Field.TtlConfig.Builder getTtlConfigBuilder onChanged(); return getTtlConfigFieldBuilder().getBuilder(); } + /** * * @@ -3600,6 +3691,7 @@ public com.google.firestore.admin.v1.Field.TtlConfigOrBuilder getTtlConfigOrBuil : ttlConfig_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java index d66a39319..0adc229e5 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java index 34a1fc941..ca27f0065 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -35,6 +35,7 @@ public final class FieldOperationMetadata extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.FieldOperationMetadata) FieldOperationMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use FieldOperationMetadata.newBuilder() to construct. private FieldOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -86,6 +87,7 @@ public interface IndexConfigDeltaOrBuilder * @return The enum numeric value on the wire for changeType. */ int getChangeTypeValue(); + /** * * @@ -114,6 +116,7 @@ public interface IndexConfigDeltaOrBuilder * @return Whether the index field is set. */ boolean hasIndex(); + /** * * @@ -126,6 +129,7 @@ public interface IndexConfigDeltaOrBuilder * @return The index. */ com.google.firestore.admin.v1.Index getIndex(); + /** * * @@ -137,6 +141,7 @@ public interface IndexConfigDeltaOrBuilder */ com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder(); } + /** * * @@ -151,6 +156,7 @@ public static final class IndexConfigDelta extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) IndexConfigDeltaOrBuilder { private static final long serialVersionUID = 0L; + // Use IndexConfigDelta.newBuilder() to construct. private IndexConfigDelta(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -235,6 +241,7 @@ public enum ChangeType implements com.google.protobuf.ProtocolMessageEnum { * CHANGE_TYPE_UNSPECIFIED = 0; */ public static final int CHANGE_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -245,6 +252,7 @@ public enum ChangeType implements com.google.protobuf.ProtocolMessageEnum { * ADD = 1; */ public static final int ADD_VALUE = 1; + /** * * @@ -344,6 +352,7 @@ private ChangeType(int value) { private int bitField0_; public static final int CHANGE_TYPE_FIELD_NUMBER = 1; private int changeType_ = 0; + /** * * @@ -361,6 +370,7 @@ private ChangeType(int value) { public int getChangeTypeValue() { return changeType_; } + /** * * @@ -388,6 +398,7 @@ public int getChangeTypeValue() { public static final int INDEX_FIELD_NUMBER = 2; private com.google.firestore.admin.v1.Index index_; + /** * * @@ -403,6 +414,7 @@ public int getChangeTypeValue() { public boolean hasIndex() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -418,6 +430,7 @@ public boolean hasIndex() { public com.google.firestore.admin.v1.Index getIndex() { return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; } + /** * * @@ -614,6 +627,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -838,6 +852,7 @@ public Builder mergeFrom( private int bitField0_; private int changeType_ = 0; + /** * * @@ -855,6 +870,7 @@ public Builder mergeFrom( public int getChangeTypeValue() { return changeType_; } + /** * * @@ -875,6 +891,7 @@ public Builder setChangeTypeValue(int value) { onChanged(); return this; } + /** * * @@ -899,6 +916,7 @@ public Builder setChangeTypeValue(int value) { .UNRECOGNIZED : result; } + /** * * @@ -923,6 +941,7 @@ public Builder setChangeType( onChanged(); return this; } + /** * * @@ -949,6 +968,7 @@ public Builder clearChangeType() { com.google.firestore.admin.v1.Index.Builder, com.google.firestore.admin.v1.IndexOrBuilder> indexBuilder_; + /** * * @@ -963,6 +983,7 @@ public Builder clearChangeType() { public boolean hasIndex() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -981,6 +1002,7 @@ public com.google.firestore.admin.v1.Index getIndex() { return indexBuilder_.getMessage(); } } + /** * * @@ -1003,6 +1025,7 @@ public Builder setIndex(com.google.firestore.admin.v1.Index value) { onChanged(); return this; } + /** * * @@ -1022,6 +1045,7 @@ public Builder setIndex(com.google.firestore.admin.v1.Index.Builder builderForVa onChanged(); return this; } + /** * * @@ -1049,6 +1073,7 @@ public Builder mergeIndex(com.google.firestore.admin.v1.Index value) { } return this; } + /** * * @@ -1068,6 +1093,7 @@ public Builder clearIndex() { onChanged(); return this; } + /** * * @@ -1082,6 +1108,7 @@ public com.google.firestore.admin.v1.Index.Builder getIndexBuilder() { onChanged(); return getIndexFieldBuilder().getBuilder(); } + /** * * @@ -1098,6 +1125,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; } } + /** * * @@ -1211,6 +1239,7 @@ public interface TtlConfigDeltaOrBuilder * @return The enum numeric value on the wire for changeType. */ int getChangeTypeValue(); + /** * * @@ -1226,6 +1255,7 @@ public interface TtlConfigDeltaOrBuilder */ com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType getChangeType(); } + /** * * @@ -1240,6 +1270,7 @@ public static final class TtlConfigDelta extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta) TtlConfigDeltaOrBuilder { private static final long serialVersionUID = 0L; + // Use TtlConfigDelta.newBuilder() to construct. private TtlConfigDelta(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1324,6 +1355,7 @@ public enum ChangeType implements com.google.protobuf.ProtocolMessageEnum { * CHANGE_TYPE_UNSPECIFIED = 0; */ public static final int CHANGE_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -1334,6 +1366,7 @@ public enum ChangeType implements com.google.protobuf.ProtocolMessageEnum { * ADD = 1; */ public static final int ADD_VALUE = 1; + /** * * @@ -1432,6 +1465,7 @@ private ChangeType(int value) { public static final int CHANGE_TYPE_FIELD_NUMBER = 1; private int changeType_ = 0; + /** * * @@ -1449,6 +1483,7 @@ private ChangeType(int value) { public int getChangeTypeValue() { return changeType_; } + /** * * @@ -1642,6 +1677,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1834,6 +1870,7 @@ public Builder mergeFrom( private int bitField0_; private int changeType_ = 0; + /** * * @@ -1851,6 +1888,7 @@ public Builder mergeFrom( public int getChangeTypeValue() { return changeType_; } + /** * * @@ -1871,6 +1909,7 @@ public Builder setChangeTypeValue(int value) { onChanged(); return this; } + /** * * @@ -1895,6 +1934,7 @@ public Builder setChangeTypeValue(int value) { .UNRECOGNIZED : result; } + /** * * @@ -1919,6 +1959,7 @@ public Builder setChangeType( onChanged(); return this; } + /** * * @@ -2009,6 +2050,7 @@ public com.google.protobuf.Parser getParserForType() { private int bitField0_; public static final int START_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -2024,6 +2066,7 @@ public com.google.protobuf.Parser getParserForType() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2039,6 +2082,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -2055,6 +2099,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -2071,6 +2116,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2087,6 +2133,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -2106,6 +2153,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object field_ = ""; + /** * * @@ -2130,6 +2178,7 @@ public java.lang.String getField() { return s; } } + /** * * @@ -2160,6 +2209,7 @@ public com.google.protobuf.ByteString getFieldBytes() { @SuppressWarnings("serial") private java.util.List indexConfigDeltas_; + /** * * @@ -2178,6 +2228,7 @@ public com.google.protobuf.ByteString getFieldBytes() { getIndexConfigDeltasList() { return indexConfigDeltas_; } + /** * * @@ -2197,6 +2248,7 @@ public com.google.protobuf.ByteString getFieldBytes() { getIndexConfigDeltasOrBuilderList() { return indexConfigDeltas_; } + /** * * @@ -2214,6 +2266,7 @@ public com.google.protobuf.ByteString getFieldBytes() { public int getIndexConfigDeltasCount() { return indexConfigDeltas_.size(); } + /** * * @@ -2232,6 +2285,7 @@ public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta get int index) { return indexConfigDeltas_.get(index); } + /** * * @@ -2253,6 +2307,7 @@ public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta get public static final int STATE_FIELD_NUMBER = 5; private int state_ = 0; + /** * * @@ -2268,6 +2323,7 @@ public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta get public int getStateValue() { return state_; } + /** * * @@ -2288,6 +2344,7 @@ public com.google.firestore.admin.v1.OperationState getState() { public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 6; private com.google.firestore.admin.v1.Progress progressDocuments_; + /** * * @@ -2303,6 +2360,7 @@ public com.google.firestore.admin.v1.OperationState getState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -2320,6 +2378,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressDocuments_; } + /** * * @@ -2338,6 +2397,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public static final int PROGRESS_BYTES_FIELD_NUMBER = 7; private com.google.firestore.admin.v1.Progress progressBytes_; + /** * * @@ -2353,6 +2413,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -2370,6 +2431,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressBytes_; } + /** * * @@ -2388,6 +2450,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder public static final int TTL_CONFIG_DELTA_FIELD_NUMBER = 8; private com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttlConfigDelta_; + /** * * @@ -2404,6 +2467,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder public boolean hasTtlConfigDelta() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -2422,6 +2486,7 @@ public com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta getTt ? com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.getDefaultInstance() : ttlConfigDelta_; } + /** * * @@ -2692,6 +2757,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -3071,6 +3137,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -3085,6 +3152,7 @@ public Builder mergeFrom( public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3103,6 +3171,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -3125,6 +3194,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -3144,6 +3214,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -3171,6 +3242,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -3190,6 +3262,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -3204,6 +3277,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -3220,6 +3294,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -3252,6 +3327,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -3267,6 +3343,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3286,6 +3363,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -3309,6 +3387,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -3329,6 +3408,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -3357,6 +3437,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -3377,6 +3458,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -3392,6 +3474,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -3409,6 +3492,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -3437,6 +3521,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private java.lang.Object field_ = ""; + /** * * @@ -3460,6 +3545,7 @@ public java.lang.String getField() { return (java.lang.String) ref; } } + /** * * @@ -3483,6 +3569,7 @@ public com.google.protobuf.ByteString getFieldBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3505,6 +3592,7 @@ public Builder setField(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3523,6 +3611,7 @@ public Builder clearField() { onChanged(); return this; } + /** * * @@ -3587,6 +3676,7 @@ private void ensureIndexConfigDeltasIsMutable() { return indexConfigDeltasBuilder_.getMessageList(); } } + /** * * @@ -3607,6 +3697,7 @@ public int getIndexConfigDeltasCount() { return indexConfigDeltasBuilder_.getCount(); } } + /** * * @@ -3628,6 +3719,7 @@ public int getIndexConfigDeltasCount() { return indexConfigDeltasBuilder_.getMessage(index); } } + /** * * @@ -3655,6 +3747,7 @@ public Builder setIndexConfigDeltas( } return this; } + /** * * @@ -3681,6 +3774,7 @@ public Builder setIndexConfigDeltas( } return this; } + /** * * @@ -3708,6 +3802,7 @@ public Builder addIndexConfigDeltas( } return this; } + /** * * @@ -3735,6 +3830,7 @@ public Builder addIndexConfigDeltas( } return this; } + /** * * @@ -3760,6 +3856,7 @@ public Builder addIndexConfigDeltas( } return this; } + /** * * @@ -3786,6 +3883,7 @@ public Builder addIndexConfigDeltas( } return this; } + /** * * @@ -3812,6 +3910,7 @@ public Builder addAllIndexConfigDeltas( } return this; } + /** * * @@ -3835,6 +3934,7 @@ public Builder clearIndexConfigDeltas() { } return this; } + /** * * @@ -3858,6 +3958,7 @@ public Builder removeIndexConfigDeltas(int index) { } return this; } + /** * * @@ -3875,6 +3976,7 @@ public Builder removeIndexConfigDeltas(int index) { getIndexConfigDeltasBuilder(int index) { return getIndexConfigDeltasFieldBuilder().getBuilder(index); } + /** * * @@ -3896,6 +3998,7 @@ public Builder removeIndexConfigDeltas(int index) { return indexConfigDeltasBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -3919,6 +4022,7 @@ public Builder removeIndexConfigDeltas(int index) { return java.util.Collections.unmodifiableList(indexConfigDeltas_); } } + /** * * @@ -3939,6 +4043,7 @@ public Builder removeIndexConfigDeltas(int index) { com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta .getDefaultInstance()); } + /** * * @@ -3960,6 +4065,7 @@ public Builder removeIndexConfigDeltas(int index) { com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta .getDefaultInstance()); } + /** * * @@ -4000,6 +4106,7 @@ public Builder removeIndexConfigDeltas(int index) { } private int state_ = 0; + /** * * @@ -4015,6 +4122,7 @@ public Builder removeIndexConfigDeltas(int index) { public int getStateValue() { return state_; } + /** * * @@ -4033,6 +4141,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -4050,6 +4159,7 @@ public com.google.firestore.admin.v1.OperationState getState() { com.google.firestore.admin.v1.OperationState.forNumber(state_); return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; } + /** * * @@ -4071,6 +4181,7 @@ public Builder setState(com.google.firestore.admin.v1.OperationState value) { onChanged(); return this; } + /** * * @@ -4095,6 +4206,7 @@ public Builder clearState() { com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressDocumentsBuilder_; + /** * * @@ -4109,6 +4221,7 @@ public Builder clearState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -4129,6 +4242,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocumentsBuilder_.getMessage(); } } + /** * * @@ -4151,6 +4265,7 @@ public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value onChanged(); return this; } + /** * * @@ -4171,6 +4286,7 @@ public Builder setProgressDocuments( onChanged(); return this; } + /** * * @@ -4198,6 +4314,7 @@ public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress val } return this; } + /** * * @@ -4217,6 +4334,7 @@ public Builder clearProgressDocuments() { onChanged(); return this; } + /** * * @@ -4231,6 +4349,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilde onChanged(); return getProgressDocumentsFieldBuilder().getBuilder(); } + /** * * @@ -4249,6 +4368,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui : progressDocuments_; } } + /** * * @@ -4281,6 +4401,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressBytesBuilder_; + /** * * @@ -4295,6 +4416,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -4315,6 +4437,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytesBuilder_.getMessage(); } } + /** * * @@ -4337,6 +4460,7 @@ public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { onChanged(); return this; } + /** * * @@ -4357,6 +4481,7 @@ public Builder setProgressBytes( onChanged(); return this; } + /** * * @@ -4384,6 +4509,7 @@ public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) } return this; } + /** * * @@ -4403,6 +4529,7 @@ public Builder clearProgressBytes() { onChanged(); return this; } + /** * * @@ -4417,6 +4544,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() onChanged(); return getProgressBytesFieldBuilder().getBuilder(); } + /** * * @@ -4435,6 +4563,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder : progressBytes_; } } + /** * * @@ -4467,6 +4596,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.Builder, com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDeltaOrBuilder> ttlConfigDeltaBuilder_; + /** * * @@ -4482,6 +4612,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder public boolean hasTtlConfigDelta() { return ((bitField0_ & 0x00000080) != 0); } + /** * * @@ -4504,6 +4635,7 @@ public com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta getTt return ttlConfigDeltaBuilder_.getMessage(); } } + /** * * @@ -4528,6 +4660,7 @@ public Builder setTtlConfigDelta( onChanged(); return this; } + /** * * @@ -4550,6 +4683,7 @@ public Builder setTtlConfigDelta( onChanged(); return this; } + /** * * @@ -4581,6 +4715,7 @@ public Builder mergeTtlConfigDelta( } return this; } + /** * * @@ -4601,6 +4736,7 @@ public Builder clearTtlConfigDelta() { onChanged(); return this; } + /** * * @@ -4617,6 +4753,7 @@ public Builder clearTtlConfigDelta() { onChanged(); return getTtlConfigDeltaFieldBuilder().getBuilder(); } + /** * * @@ -4638,6 +4775,7 @@ public Builder clearTtlConfigDelta() { : ttlConfigDelta_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.java index 29f38bb53..ae1f9beb8 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface FieldOperationMetadataOrBuilder @@ -36,6 +36,7 @@ public interface FieldOperationMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -48,6 +49,7 @@ public interface FieldOperationMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -72,6 +74,7 @@ public interface FieldOperationMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -85,6 +88,7 @@ public interface FieldOperationMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -110,6 +114,7 @@ public interface FieldOperationMetadataOrBuilder * @return The field. */ java.lang.String getField(); + /** * * @@ -139,6 +144,7 @@ public interface FieldOperationMetadataOrBuilder */ java.util.List getIndexConfigDeltasList(); + /** * * @@ -154,6 +160,7 @@ public interface FieldOperationMetadataOrBuilder */ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexConfigDeltas( int index); + /** * * @@ -168,6 +175,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo *
*/ int getIndexConfigDeltasCount(); + /** * * @@ -184,6 +192,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo java.util.List< ? extends com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder> getIndexConfigDeltasOrBuilderList(); + /** * * @@ -212,6 +221,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -237,6 +247,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo * @return Whether the progressDocuments field is set. */ boolean hasProgressDocuments(); + /** * * @@ -249,6 +260,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo * @return The progressDocuments. */ com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** * * @@ -272,6 +284,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo * @return Whether the progressBytes field is set. */ boolean hasProgressBytes(); + /** * * @@ -284,6 +297,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo * @return The progressBytes. */ com.google.firestore.admin.v1.Progress getProgressBytes(); + /** * * @@ -308,6 +322,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo * @return Whether the ttlConfigDelta field is set. */ boolean hasTtlConfigDelta(); + /** * * @@ -321,6 +336,7 @@ com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexCo * @return The ttlConfigDelta. */ com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta getTtlConfigDelta(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java index 9c3a530b4..20ad40096 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/field.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface FieldOrBuilder @@ -59,6 +59,7 @@ public interface FieldOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -110,6 +111,7 @@ public interface FieldOrBuilder * @return Whether the indexConfig field is set. */ boolean hasIndexConfig(); + /** * * @@ -125,6 +127,7 @@ public interface FieldOrBuilder * @return The indexConfig. */ com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig(); + /** * * @@ -153,6 +156,7 @@ public interface FieldOrBuilder * @return Whether the ttlConfig field is set. */ boolean hasTtlConfig(); + /** * * @@ -167,6 +171,7 @@ public interface FieldOrBuilder * @return The ttlConfig. */ com.google.firestore.admin.v1.Field.TtlConfig getTtlConfig(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java index 1187f1eba..28d078d5b 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/field.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class FieldProto { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java index 3c2aff0bf..ce80b58ad 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class FirestoreAdminProto { @@ -64,6 +64,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_admin_v1_DeleteDatabaseMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_admin_v1_DeleteDatabaseMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_CreateUserCredsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_CreateUserCredsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_GetUserCredsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_GetUserCredsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ListUserCredsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ListUserCredsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ListUserCredsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ListUserCredsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_EnableUserCredsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_EnableUserCredsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_DisableUserCredsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_DisableUserCredsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_admin_v1_CreateBackupScheduleRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -160,6 +192,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_TagsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_TagsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -173,235 +217,312 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "min.proto\022\031google.firestore.admin.v1\032\034go" + "ogle/api/annotations.proto\032\027google/api/c" + "lient.proto\032\037google/api/field_behavior.p" - + "roto\032\031google/api/resource.proto\032&google/" - + "firestore/admin/v1/backup.proto\032(google/" - + "firestore/admin/v1/database.proto\032%googl" - + "e/firestore/admin/v1/field.proto\032%google" - + "/firestore/admin/v1/index.proto\032)google/" - + "firestore/admin/v1/operation.proto\032(goog" - + "le/firestore/admin/v1/schedule.proto\032#go" - + "ogle/longrunning/operations.proto\032\033googl" - + "e/protobuf/empty.proto\032 google/protobuf/" - + "field_mask.proto\032\037google/protobuf/timest" - + "amp.proto\"g\n\024ListDatabasesRequest\0229\n\006par" - + "ent\030\001 \001(\tB)\340A\002\372A#\022!firestore.googleapis." - + "com/Database\022\024\n\014show_deleted\030\004 \001(\010\"\250\001\n\025C" - + "reateDatabaseRequest\0229\n\006parent\030\001 \001(\tB)\340A" - + "\002\372A#\022!firestore.googleapis.com/Database\022" - + ":\n\010database\030\002 \001(\0132#.google.firestore.adm" - + "in.v1.DatabaseB\003\340A\002\022\030\n\013database_id\030\003 \001(\t" - + "B\003\340A\002\"\030\n\026CreateDatabaseMetadata\"d\n\025ListD" - + "atabasesResponse\0226\n\tdatabases\030\001 \003(\0132#.go" - + "ogle.firestore.admin.v1.Database\022\023\n\013unre" - + "achable\030\003 \003(\t\"M\n\022GetDatabaseRequest\0227\n\004n" - + "ame\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapis." - + "com/Database\"\204\001\n\025UpdateDatabaseRequest\022:" - + "\n\010database\030\001 \001(\0132#.google.firestore.admi" - + "n.v1.DatabaseB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132" - + "\032.google.protobuf.FieldMask\"\030\n\026UpdateDat" - + "abaseMetadata\"^\n\025DeleteDatabaseRequest\0227" - + "\n\004name\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleap" - + "is.com/Database\022\014\n\004etag\030\003 \001(\t\"\030\n\026DeleteD" - + "atabaseMetadata\"\241\001\n\033CreateBackupSchedule" - + "Request\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!firesto" - + "re.googleapis.com/Database\022G\n\017backup_sch" - + "edule\030\002 \001(\0132).google.firestore.admin.v1." - + "BackupScheduleB\003\340A\002\"Y\n\030GetBackupSchedule" - + "Request\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'firestore" - + ".googleapis.com/BackupSchedule\"\227\001\n\033Updat" - + "eBackupScheduleRequest\022G\n\017backup_schedul" - + "e\030\001 \001(\0132).google.firestore.admin.v1.Back" - + "upScheduleB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.g" - + "oogle.protobuf.FieldMask\"W\n\032ListBackupSc" - + "hedulesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!" - + "firestore.googleapis.com/Database\"b\n\033Lis" - + "tBackupSchedulesResponse\022C\n\020backup_sched" - + "ules\030\001 \003(\0132).google.firestore.admin.v1.B" - + "ackupSchedule\"\\\n\033DeleteBackupScheduleReq" - + "uest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'firestore.go" - + "ogleapis.com/BackupSchedule\"\214\001\n\022CreateIn" - + "dexRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\n(fire" - + "store.googleapis.com/CollectionGroup\0224\n\005" - + "index\030\002 \001(\0132 .google.firestore.admin.v1." - + "IndexB\003\340A\002\"\215\001\n\022ListIndexesRequest\022@\n\006par" - + "ent\030\001 \001(\tB0\340A\002\372A*\n(firestore.googleapis." - + "com/CollectionGroup\022\016\n\006filter\030\002 \001(\t\022\021\n\tp" - + "age_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"a\n\023Li" - + "stIndexesResponse\0221\n\007indexes\030\001 \003(\0132 .goo" - + "gle.firestore.admin.v1.Index\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"G\n\017GetIndexRequest\0224\n\004name" - + "\030\001 \001(\tB&\340A\002\372A \n\036firestore.googleapis.com" - + "/Index\"J\n\022DeleteIndexRequest\0224\n\004name\030\001 \001" - + "(\tB&\340A\002\372A \n\036firestore.googleapis.com/Ind" - + "ex\"{\n\022UpdateFieldRequest\0224\n\005field\030\001 \001(\0132" - + " .google.firestore.admin.v1.FieldB\003\340A\002\022/" - + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" - + "eldMask\"G\n\017GetFieldRequest\0224\n\004name\030\001 \001(\t" - + "B&\340A\002\372A \n\036firestore.googleapis.com/Field" - + "\"\214\001\n\021ListFieldsRequest\022@\n\006parent\030\001 \001(\tB0" - + "\340A\002\372A*\n(firestore.googleapis.com/Collect" - + "ionGroup\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 " - + "\001(\005\022\022\n\npage_token\030\004 \001(\t\"_\n\022ListFieldsRes" - + "ponse\0220\n\006fields\030\001 \003(\0132 .google.firestore" - + ".admin.v1.Field\022\027\n\017next_page_token\030\002 \001(\t" - + "\"\316\001\n\026ExportDocumentsRequest\0227\n\004name\030\001 \001(" + + "roto\032\031google/api/resource.proto\032\030google/" + + "api/routing.proto\032&google/firestore/admi" + + "n/v1/backup.proto\032(google/firestore/admi" + + "n/v1/database.proto\032%google/firestore/ad" + + "min/v1/field.proto\032%google/firestore/adm" + + "in/v1/index.proto\032)google/firestore/admi" + + "n/v1/operation.proto\032(google/firestore/a" + + "dmin/v1/schedule.proto\032(google/firestore" + + "/admin/v1/snapshot.proto\032*google/firesto" + + "re/admin/v1/user_creds.proto\032#google/lon" + + "grunning/operations.proto\032\033google/protob" + + "uf/empty.proto\032 google/protobuf/field_ma" + + "sk.proto\032\037google/protobuf/timestamp.prot" + + "o\"g\n\024ListDatabasesRequest\0229\n\006parent\030\001 \001(" + + "\tB)\340A\002\372A#\022!firestore.googleapis.com/Data" + + "base\022\024\n\014show_deleted\030\004 \001(\010\"\250\001\n\025CreateDat" + + "abaseRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!fi" + + "restore.googleapis.com/Database\022:\n\010datab" + + "ase\030\002 \001(\0132#.google.firestore.admin.v1.Da" + + "tabaseB\003\340A\002\022\030\n\013database_id\030\003 \001(\tB\003\340A\002\"\030\n" + + "\026CreateDatabaseMetadata\"d\n\025ListDatabases" + + "Response\0226\n\tdatabases\030\001 \003(\0132#.google.fir" + + "estore.admin.v1.Database\022\023\n\013unreachable\030" + + "\003 \003(\t\"M\n\022GetDatabaseRequest\0227\n\004name\030\001 \001(" + "\tB)\340A\002\372A#\n!firestore.googleapis.com/Data" - + "base\022\026\n\016collection_ids\030\002 \003(\t\022\031\n\021output_u" - + "ri_prefix\030\003 \001(\t\022\025\n\rnamespace_ids\030\004 \003(\t\0221" - + "\n\rsnapshot_time\030\005 \001(\0132\032.google.protobuf." - + "Timestamp\"\232\001\n\026ImportDocumentsRequest\0227\n\004" - + "name\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapis" - + ".com/Database\022\026\n\016collection_ids\030\002 \003(\t\022\030\n" - + "\020input_uri_prefix\030\003 \001(\t\022\025\n\rnamespace_ids" - + "\030\004 \003(\t\"\216\001\n\032BulkDeleteDocumentsRequest\0227\n" - + "\004name\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapi" - + "s.com/Database\022\033\n\016collection_ids\030\002 \003(\tB\003" - + "\340A\001\022\032\n\rnamespace_ids\030\003 \003(\tB\003\340A\001\"\035\n\033BulkD" - + "eleteDocumentsResponse\"I\n\020GetBackupReque" - + "st\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037firestore.goog" - + "leapis.com/Backup\"O\n\022ListBackupsRequest\022" - + "9\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!firestore.googl" - + "eapis.com/Location\"^\n\023ListBackupsRespons" - + "e\0222\n\007backups\030\001 \003(\0132!.google.firestore.ad" - + "min.v1.Backup\022\023\n\013unreachable\030\003 \003(\t\"L\n\023De" - + "leteBackupRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n" - + "\037firestore.googleapis.com/Backup\"\246\001\n\026Res" - + "toreDatabaseRequest\0229\n\006parent\030\001 \001(\tB)\340A\002" - + "\372A#\022!firestore.googleapis.com/Database\022\030" - + "\n\013database_id\030\002 \001(\tB\003\340A\002\0227\n\006backup\030\003 \001(\t" - + "B\'\340A\002\372A!\n\037firestore.googleapis.com/Backu" - + "p2\313%\n\016FirestoreAdmin\022\333\001\n\013CreateIndex\022-.g" - + "oogle.firestore.admin.v1.CreateIndexRequ" - + "est\032\035.google.longrunning.Operation\"~\312A\037\n" - + "\005Index\022\026IndexOperationMetadata\332A\014parent," - + "index\202\323\344\223\002G\">/v1/{parent=projects/*/data" - + "bases/*/collectionGroups/*}/indexes:\005ind" - + "ex\022\275\001\n\013ListIndexes\022-.google.firestore.ad" - + "min.v1.ListIndexesRequest\032..google.fires" - + "tore.admin.v1.ListIndexesResponse\"O\332A\006pa" - + "rent\202\323\344\223\002@\022>/v1/{parent=projects/*/datab" - + "ases/*/collectionGroups/*}/indexes\022\247\001\n\010G" - + "etIndex\022*.google.firestore.admin.v1.GetI" - + "ndexRequest\032 .google.firestore.admin.v1." - + "Index\"M\332A\004name\202\323\344\223\002@\022>/v1/{name=projects" - + "/*/databases/*/collectionGroups/*/indexe" - + "s/*}\022\243\001\n\013DeleteIndex\022-.google.firestore." - + "admin.v1.DeleteIndexRequest\032\026.google.pro" - + "tobuf.Empty\"M\332A\004name\202\323\344\223\002@*>/v1/{name=pr" - + "ojects/*/databases/*/collectionGroups/*/" - + "indexes/*}\022\246\001\n\010GetField\022*.google.firesto" - + "re.admin.v1.GetFieldRequest\032 .google.fir" - + "estore.admin.v1.Field\"L\332A\004name\202\323\344\223\002?\022=/v" - + "1/{name=projects/*/databases/*/collectio" - + "nGroups/*/fields/*}\022\331\001\n\013UpdateField\022-.go" - + "ogle.firestore.admin.v1.UpdateFieldReque" - + "st\032\035.google.longrunning.Operation\"|\312A\037\n\005" - + "Field\022\026FieldOperationMetadata\332A\005field\202\323\344" - + "\223\002L2C/v1/{field.name=projects/*/database" - + "s/*/collectionGroups/*/fields/*}:\005field\022" - + "\271\001\n\nListFields\022,.google.firestore.admin." - + "v1.ListFieldsRequest\032-.google.firestore." - + "admin.v1.ListFieldsResponse\"N\332A\006parent\202\323" - + "\344\223\002?\022=/v1/{parent=projects/*/databases/*" - + "/collectionGroups/*}/fields\022\335\001\n\017ExportDo" - + "cuments\0221.google.firestore.admin.v1.Expo" - + "rtDocumentsRequest\032\035.google.longrunning." - + "Operation\"x\312A2\n\027ExportDocumentsResponse\022" - + "\027ExportDocumentsMetadata\332A\004name\202\323\344\223\0026\"1/" - + "v1/{name=projects/*/databases/*}:exportD" - + "ocuments:\001*\022\333\001\n\017ImportDocuments\0221.google" - + ".firestore.admin.v1.ImportDocumentsReque" - + "st\032\035.google.longrunning.Operation\"v\312A0\n\025" - + "google.protobuf.Empty\022\027ImportDocumentsMe" - + "tadata\332A\004name\202\323\344\223\0026\"1/v1/{name=projects/" - + "*/databases/*}:importDocuments:\001*\022\362\001\n\023Bu" - + "lkDeleteDocuments\0225.google.firestore.adm" - + "in.v1.BulkDeleteDocumentsRequest\032\035.googl" - + "e.longrunning.Operation\"\204\001\312A:\n\033BulkDelet" - + "eDocumentsResponse\022\033BulkDeleteDocumentsM" - + "etadata\332A\004name\202\323\344\223\002:\"5/v1/{name=projects" - + "/*/databases/*}:bulkDeleteDocuments:\001*\022\331" - + "\001\n\016CreateDatabase\0220.google.firestore.adm" - + "in.v1.CreateDatabaseRequest\032\035.google.lon" - + "grunning.Operation\"v\312A\"\n\010Database\022\026Creat" - + "eDatabaseMetadata\332A\033parent,database,data" - + "base_id\202\323\344\223\002-\"!/v1/{parent=projects/*}/d" - + "atabases:\010database\022\223\001\n\013GetDatabase\022-.goo" - + "gle.firestore.admin.v1.GetDatabaseReques" - + "t\032#.google.firestore.admin.v1.Database\"0" - + "\332A\004name\202\323\344\223\002#\022!/v1/{name=projects/*/data" - + "bases/*}\022\246\001\n\rListDatabases\022/.google.fire" - + "store.admin.v1.ListDatabasesRequest\0320.go" - + "ogle.firestore.admin.v1.ListDatabasesRes" - + "ponse\"2\332A\006parent\202\323\344\223\002#\022!/v1/{parent=proj" - + "ects/*}/databases\022\333\001\n\016UpdateDatabase\0220.g" - + "oogle.firestore.admin.v1.UpdateDatabaseR" - + "equest\032\035.google.longrunning.Operation\"x\312" - + "A\"\n\010Database\022\026UpdateDatabaseMetadata\332A\024d" - + "atabase,update_mask\202\323\344\223\00262*/v1/{database" - + ".name=projects/*/databases/*}:\010database\022" - + "\270\001\n\016DeleteDatabase\0220.google.firestore.ad" - + "min.v1.DeleteDatabaseRequest\032\035.google.lo" - + "ngrunning.Operation\"U\312A\"\n\010Database\022\026Dele" - + "teDatabaseMetadata\332A\004name\202\323\344\223\002#*!/v1/{na" - + "me=projects/*/databases/*}\022\227\001\n\tGetBackup" - + "\022+.google.firestore.admin.v1.GetBackupRe" - + "quest\032!.google.firestore.admin.v1.Backup" - + "\":\332A\004name\202\323\344\223\002-\022+/v1/{name=projects/*/lo" - + "cations/*/backups/*}\022\252\001\n\013ListBackups\022-.g" - + "oogle.firestore.admin.v1.ListBackupsRequ" - + "est\032..google.firestore.admin.v1.ListBack" - + "upsResponse\"<\332A\006parent\202\323\344\223\002-\022+/v1/{paren" - + "t=projects/*/locations/*}/backups\022\222\001\n\014De" - + "leteBackup\022..google.firestore.admin.v1.D" - + "eleteBackupRequest\032\026.google.protobuf.Emp" - + "ty\":\332A\004name\202\323\344\223\002-*+/v1/{name=projects/*/" - + "locations/*/backups/*}\022\277\001\n\017RestoreDataba" - + "se\0221.google.firestore.admin.v1.RestoreDa" - + "tabaseRequest\032\035.google.longrunning.Opera" - + "tion\"Z\312A#\n\010Database\022\027RestoreDatabaseMeta" - + "data\202\323\344\223\002.\")/v1/{parent=projects/*}/data" - + "bases:restore:\001*\022\340\001\n\024CreateBackupSchedul" - + "e\0226.google.firestore.admin.v1.CreateBack" - + "upScheduleRequest\032).google.firestore.adm" - + "in.v1.BackupSchedule\"e\332A\026parent,backup_s" - + "chedule\202\323\344\223\002F\"3/v1/{parent=projects/*/da" - + "tabases/*}/backupSchedules:\017backup_sched" - + "ule\022\267\001\n\021GetBackupSchedule\0223.google.fires" - + "tore.admin.v1.GetBackupScheduleRequest\032)" - + ".google.firestore.admin.v1.BackupSchedul" - + "e\"B\332A\004name\202\323\344\223\0025\0223/v1/{name=projects/*/d" - + "atabases/*/backupSchedules/*}\022\312\001\n\023ListBa" - + "ckupSchedules\0225.google.firestore.admin.v" - + "1.ListBackupSchedulesRequest\0326.google.fi" - + "restore.admin.v1.ListBackupSchedulesResp" - + "onse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent=proje" - + "cts/*/databases/*}/backupSchedules\022\365\001\n\024U" - + "pdateBackupSchedule\0226.google.firestore.a" - + "dmin.v1.UpdateBackupScheduleRequest\032).go" - + "ogle.firestore.admin.v1.BackupSchedule\"z" - + "\332A\033backup_schedule,update_mask\202\323\344\223\002V2C/v" - + "1/{backup_schedule.name=projects/*/datab" - + "ases/*/backupSchedules/*}:\017backup_schedu" - + "le\022\252\001\n\024DeleteBackupSchedule\0226.google.fir" - + "estore.admin.v1.DeleteBackupScheduleRequ" - + "est\032\026.google.protobuf.Empty\"B\332A\004name\202\323\344\223" - + "\0025*3/v1/{name=projects/*/databases/*/bac" - + "kupSchedules/*}\032v\312A\030firestore.googleapis" - + ".com\322AXhttps://www.googleapis.com/auth/c" - + "loud-platform,https://www.googleapis.com" - + "/auth/datastoreB\245\003\n\035com.google.firestore" - + ".admin.v1B\023FirestoreAdminProtoP\001Z9cloud." - + "google.com/go/firestore/apiv1/admin/admi" - + "npb;adminpb\242\002\004GCFS\252\002\037Google.Cloud.Firest" - + "ore.Admin.V1\312\002\037Google\\Cloud\\Firestore\\Ad" - + "min\\V1\352\002#Google::Cloud::Firestore::Admin" - + "::V1\352AL\n!firestore.googleapis.com/Locati" - + "on\022\'projects/{project}/locations/{locati" - + "on}\352Aq\n(firestore.googleapis.com/Collect" - + "ionGroup\022Eprojects/{project}/databases/{" - + "database}/collectionGroups/{collection}b" - + "\006proto3" + + "base\"\204\001\n\025UpdateDatabaseRequest\022:\n\010databa" + + "se\030\001 \001(\0132#.google.firestore.admin.v1.Dat" + + "abaseB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google" + + ".protobuf.FieldMask\"\030\n\026UpdateDatabaseMet" + + "adata\"^\n\025DeleteDatabaseRequest\0227\n\004name\030\001" + + " \001(\tB)\340A\002\372A#\n!firestore.googleapis.com/D" + + "atabase\022\014\n\004etag\030\003 \001(\t\"\030\n\026DeleteDatabaseM" + + "etadata\"\257\001\n\026CreateUserCredsRequest\022:\n\006pa" + + "rent\030\001 \001(\tB*\340A\002\372A$\022\"firestore.googleapis" + + ".com/UserCreds\022=\n\nuser_creds\030\002 \001(\0132$.goo" + + "gle.firestore.admin.v1.UserCredsB\003\340A\002\022\032\n" + + "\ruser_creds_id\030\003 \001(\tB\003\340A\002\"O\n\023GetUserCred" + + "sRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"firestor" + + "e.googleapis.com/UserCreds\"R\n\024ListUserCr" + + "edsRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"fire" + + "store.googleapis.com/UserCreds\"Q\n\025ListUs" + + "erCredsResponse\0228\n\nuser_creds\030\001 \003(\0132$.go" + + "ogle.firestore.admin.v1.UserCreds\"R\n\026Ena" + + "bleUserCredsRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A" + + "$\n\"firestore.googleapis.com/UserCreds\"S\n" + + "\027DisableUserCredsRequest\0228\n\004name\030\001 \001(\tB*" + + "\340A\002\372A$\n\"firestore.googleapis.com/UserCre" + + "ds\"T\n\030ResetUserPasswordRequest\0228\n\004name\030\001" + + " \001(\tB*\340A\002\372A$\n\"firestore.googleapis.com/U" + + "serCreds\"R\n\026DeleteUserCredsRequest\0228\n\004na" + + "me\030\001 \001(\tB*\340A\002\372A$\n\"firestore.googleapis.c" + + "om/UserCreds\"\241\001\n\033CreateBackupScheduleReq" + + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!firestore." + + "googleapis.com/Database\022G\n\017backup_schedu" + + "le\030\002 \001(\0132).google.firestore.admin.v1.Bac" + + "kupScheduleB\003\340A\002\"Y\n\030GetBackupScheduleReq" + + "uest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'firestore.go" + + "ogleapis.com/BackupSchedule\"\227\001\n\033UpdateBa" + + "ckupScheduleRequest\022G\n\017backup_schedule\030\001" + + " \001(\0132).google.firestore.admin.v1.BackupS" + + "cheduleB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMask\"W\n\032ListBackupSched" + + "ulesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!fir" + + "estore.googleapis.com/Database\"b\n\033ListBa" + + "ckupSchedulesResponse\022C\n\020backup_schedule" + + "s\030\001 \003(\0132).google.firestore.admin.v1.Back" + + "upSchedule\"\\\n\033DeleteBackupScheduleReques" + + "t\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'firestore.googl" + + "eapis.com/BackupSchedule\"\214\001\n\022CreateIndex" + + "Request\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\n(firesto" + + "re.googleapis.com/CollectionGroup\0224\n\005ind" + + "ex\030\002 \001(\0132 .google.firestore.admin.v1.Ind" + + "exB\003\340A\002\"\215\001\n\022ListIndexesRequest\022@\n\006parent" + + "\030\001 \001(\tB0\340A\002\372A*\n(firestore.googleapis.com" + + "/CollectionGroup\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage" + + "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"a\n\023ListI" + + "ndexesResponse\0221\n\007indexes\030\001 \003(\0132 .google" + + ".firestore.admin.v1.Index\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"G\n\017GetIndexRequest\0224\n\004name\030\001 " + + "\001(\tB&\340A\002\372A \n\036firestore.googleapis.com/In" + + "dex\"J\n\022DeleteIndexRequest\0224\n\004name\030\001 \001(\tB" + + "&\340A\002\372A \n\036firestore.googleapis.com/Index\"" + + "{\n\022UpdateFieldRequest\0224\n\005field\030\001 \001(\0132 .g" + + "oogle.firestore.admin.v1.FieldB\003\340A\002\022/\n\013u" + + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" + + "Mask\"G\n\017GetFieldRequest\0224\n\004name\030\001 \001(\tB&\340" + + "A\002\372A \n\036firestore.googleapis.com/Field\"\214\001" + + "\n\021ListFieldsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002" + + "\372A*\n(firestore.googleapis.com/Collection" + + "Group\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" + + "\022\022\n\npage_token\030\004 \001(\t\"_\n\022ListFieldsRespon" + + "se\0220\n\006fields\030\001 \003(\0132 .google.firestore.ad" + + "min.v1.Field\022\027\n\017next_page_token\030\002 \001(\t\"\316\001" + + "\n\026ExportDocumentsRequest\0227\n\004name\030\001 \001(\tB)" + + "\340A\002\372A#\n!firestore.googleapis.com/Databas" + + "e\022\026\n\016collection_ids\030\002 \003(\t\022\031\n\021output_uri_" + + "prefix\030\003 \001(\t\022\025\n\rnamespace_ids\030\004 \003(\t\0221\n\rs" + + "napshot_time\030\005 \001(\0132\032.google.protobuf.Tim" + + "estamp\"\232\001\n\026ImportDocumentsRequest\0227\n\004nam" + + "e\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapis.co" + + "m/Database\022\026\n\016collection_ids\030\002 \003(\t\022\030\n\020in" + + "put_uri_prefix\030\003 \001(\t\022\025\n\rnamespace_ids\030\004 " + + "\003(\t\"\216\001\n\032BulkDeleteDocumentsRequest\0227\n\004na" + + "me\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapis.c" + + "om/Database\022\033\n\016collection_ids\030\002 \003(\tB\003\340A\001" + + "\022\032\n\rnamespace_ids\030\003 \003(\tB\003\340A\001\"\035\n\033BulkDele" + + "teDocumentsResponse\"I\n\020GetBackupRequest\022" + + "5\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037firestore.googlea" + + "pis.com/Backup\"_\n\022ListBackupsRequest\0229\n\006" + + "parent\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleap" + + "is.com/Location\022\016\n\006filter\030\002 \001(\t\"^\n\023ListB" + + "ackupsResponse\0222\n\007backups\030\001 \003(\0132!.google" + + ".firestore.admin.v1.Backup\022\023\n\013unreachabl" + + "e\030\003 \003(\t\"L\n\023DeleteBackupRequest\0225\n\004name\030\001" + + " \001(\tB\'\340A\002\372A!\n\037firestore.googleapis.com/B" + + "ackup\"\374\002\n\026RestoreDatabaseRequest\0229\n\006pare" + + "nt\030\001 \001(\tB)\340A\002\372A#\022!firestore.googleapis.c" + + "om/Database\022\030\n\013database_id\030\002 \001(\tB\003\340A\002\0227\n" + + "\006backup\030\003 \001(\tB\'\340A\002\372A!\n\037firestore.googlea" + + "pis.com/Backup\022T\n\021encryption_config\030\t \001(" + + "\01324.google.firestore.admin.v1.Database.E" + + "ncryptionConfigB\003\340A\001\022Q\n\004tags\030\n \003(\0132;.goo" + + "gle.firestore.admin.v1.RestoreDatabaseRe" + + "quest.TagsEntryB\006\340A\005\340A\001\032+\n\tTagsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\204\003\n\024CloneDa" + + "tabaseRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!f" + + "irestore.googleapis.com/Database\022\030\n\013data" + + "base_id\030\002 \001(\tB\003\340A\002\022C\n\rpitr_snapshot\030\006 \001(" + + "\0132\'.google.firestore.admin.v1.PitrSnapsh" + + "otB\003\340A\002\022T\n\021encryption_config\030\004 \001(\01324.goo" + + "gle.firestore.admin.v1.Database.Encrypti" + + "onConfigB\003\340A\001\022O\n\004tags\030\005 \003(\01329.google.fir" + + "estore.admin.v1.CloneDatabaseRequest.Tag" + + "sEntryB\006\340A\005\340A\001\032+\n\tTagsEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\0012\3731\n\016FirestoreAdmin\022\333" + + "\001\n\013CreateIndex\022-.google.firestore.admin." + + "v1.CreateIndexRequest\032\035.google.longrunni" + + "ng.Operation\"~\312A\037\n\005Index\022\026IndexOperation" + + "Metadata\332A\014parent,index\202\323\344\223\002G\">/v1/{pare" + + "nt=projects/*/databases/*/collectionGrou" + + "ps/*}/indexes:\005index\022\275\001\n\013ListIndexes\022-.g" + + "oogle.firestore.admin.v1.ListIndexesRequ" + + "est\032..google.firestore.admin.v1.ListInde" + + "xesResponse\"O\332A\006parent\202\323\344\223\002@\022>/v1/{paren" + + "t=projects/*/databases/*/collectionGroup" + + "s/*}/indexes\022\247\001\n\010GetIndex\022*.google.fires" + + "tore.admin.v1.GetIndexRequest\032 .google.f" + + "irestore.admin.v1.Index\"M\332A\004name\202\323\344\223\002@\022>" + + "/v1/{name=projects/*/databases/*/collect" + + "ionGroups/*/indexes/*}\022\243\001\n\013DeleteIndex\022-" + + ".google.firestore.admin.v1.DeleteIndexRe" + + "quest\032\026.google.protobuf.Empty\"M\332A\004name\202\323" + + "\344\223\002@*>/v1/{name=projects/*/databases/*/c" + + "ollectionGroups/*/indexes/*}\022\246\001\n\010GetFiel" + + "d\022*.google.firestore.admin.v1.GetFieldRe" + + "quest\032 .google.firestore.admin.v1.Field\"" + + "L\332A\004name\202\323\344\223\002?\022=/v1/{name=projects/*/dat" + + "abases/*/collectionGroups/*/fields/*}\022\331\001" + + "\n\013UpdateField\022-.google.firestore.admin.v" + + "1.UpdateFieldRequest\032\035.google.longrunnin" + + "g.Operation\"|\312A\037\n\005Field\022\026FieldOperationM" + + "etadata\332A\005field\202\323\344\223\002L2C/v1/{field.name=p" + + "rojects/*/databases/*/collectionGroups/*" + + "/fields/*}:\005field\022\271\001\n\nListFields\022,.googl" + + "e.firestore.admin.v1.ListFieldsRequest\032-" + + ".google.firestore.admin.v1.ListFieldsRes" + + "ponse\"N\332A\006parent\202\323\344\223\002?\022=/v1/{parent=proj" + + "ects/*/databases/*/collectionGroups/*}/f" + + "ields\022\335\001\n\017ExportDocuments\0221.google.fires" + + "tore.admin.v1.ExportDocumentsRequest\032\035.g" + + "oogle.longrunning.Operation\"x\312A2\n\027Export" + + "DocumentsResponse\022\027ExportDocumentsMetada" + + "ta\332A\004name\202\323\344\223\0026\"1/v1/{name=projects/*/da" + + "tabases/*}:exportDocuments:\001*\022\333\001\n\017Import" + + "Documents\0221.google.firestore.admin.v1.Im" + + "portDocumentsRequest\032\035.google.longrunnin" + + "g.Operation\"v\312A0\n\025google.protobuf.Empty\022" + + "\027ImportDocumentsMetadata\332A\004name\202\323\344\223\0026\"1/" + + "v1/{name=projects/*/databases/*}:importD" + + "ocuments:\001*\022\362\001\n\023BulkDeleteDocuments\0225.go" + + "ogle.firestore.admin.v1.BulkDeleteDocume" + + "ntsRequest\032\035.google.longrunning.Operatio" + + "n\"\204\001\312A:\n\033BulkDeleteDocumentsResponse\022\033Bu" + + "lkDeleteDocumentsMetadata\332A\004name\202\323\344\223\002:\"5" + + "/v1/{name=projects/*/databases/*}:bulkDe" + + "leteDocuments:\001*\022\331\001\n\016CreateDatabase\0220.go" + + "ogle.firestore.admin.v1.CreateDatabaseRe" + + "quest\032\035.google.longrunning.Operation\"v\312A" + + "\"\n\010Database\022\026CreateDatabaseMetadata\332A\033pa" + + "rent,database,database_id\202\323\344\223\002-\"!/v1/{pa" + + "rent=projects/*}/databases:\010database\022\223\001\n" + + "\013GetDatabase\022-.google.firestore.admin.v1" + + ".GetDatabaseRequest\032#.google.firestore.a" + + "dmin.v1.Database\"0\332A\004name\202\323\344\223\002#\022!/v1/{na" + + "me=projects/*/databases/*}\022\246\001\n\rListDatab" + + "ases\022/.google.firestore.admin.v1.ListDat" + + "abasesRequest\0320.google.firestore.admin.v" + + "1.ListDatabasesResponse\"2\332A\006parent\202\323\344\223\002#" + + "\022!/v1/{parent=projects/*}/databases\022\333\001\n\016" + + "UpdateDatabase\0220.google.firestore.admin." + + "v1.UpdateDatabaseRequest\032\035.google.longru" + + "nning.Operation\"x\312A\"\n\010Database\022\026UpdateDa" + + "tabaseMetadata\332A\024database,update_mask\202\323\344" + + "\223\00262*/v1/{database.name=projects/*/datab" + + "ases/*}:\010database\022\270\001\n\016DeleteDatabase\0220.g" + + "oogle.firestore.admin.v1.DeleteDatabaseR" + + "equest\032\035.google.longrunning.Operation\"U\312" + + "A\"\n\010Database\022\026DeleteDatabaseMetadata\332A\004n" + + "ame\202\323\344\223\002#*!/v1/{name=projects/*/database" + + "s/*}\022\317\001\n\017CreateUserCreds\0221.google.firest" + + "ore.admin.v1.CreateUserCredsRequest\032$.go" + + "ogle.firestore.admin.v1.UserCreds\"c\332A\037pa" + + "rent,user_creds,user_creds_id\202\323\344\223\002;\"-/v1" + + "/{parent=projects/*/databases/*}/userCre" + + "ds:\nuser_creds\022\242\001\n\014GetUserCreds\022..google" + + ".firestore.admin.v1.GetUserCredsRequest\032" + + "$.google.firestore.admin.v1.UserCreds\"<\332" + + "A\004name\202\323\344\223\002/\022-/v1/{name=projects/*/datab" + + "ases/*/userCreds/*}\022\262\001\n\rListUserCreds\022/." + + "google.firestore.admin.v1.ListUserCredsR" + + "equest\0320.google.firestore.admin.v1.ListU" + + "serCredsResponse\">\332A\006parent\202\323\344\223\002/\022-/v1/{" + + "parent=projects/*/databases/*}/userCreds" + + "\022\262\001\n\017EnableUserCreds\0221.google.firestore." + + "admin.v1.EnableUserCredsRequest\032$.google" + + ".firestore.admin.v1.UserCreds\"F\332A\004name\202\323" + + "\344\223\0029\"4/v1/{name=projects/*/databases/*/u" + + "serCreds/*}:enable:\001*\022\265\001\n\020DisableUserCre" + + "ds\0222.google.firestore.admin.v1.DisableUs" + + "erCredsRequest\032$.google.firestore.admin." + + "v1.UserCreds\"G\332A\004name\202\323\344\223\002:\"5/v1/{name=p" + + "rojects/*/databases/*/userCreds/*}:disab" + + "le:\001*\022\275\001\n\021ResetUserPassword\0223.google.fir" + + "estore.admin.v1.ResetUserPasswordRequest" + + "\032$.google.firestore.admin.v1.UserCreds\"M" + + "\332A\004name\202\323\344\223\002@\";/v1/{name=projects/*/data" + + "bases/*/userCreds/*}:resetPassword:\001*\022\232\001" + + "\n\017DeleteUserCreds\0221.google.firestore.adm" + + "in.v1.DeleteUserCredsRequest\032\026.google.pr" + + "otobuf.Empty\"<\332A\004name\202\323\344\223\002/*-/v1/{name=p" + + "rojects/*/databases/*/userCreds/*}\022\227\001\n\tG" + + "etBackup\022+.google.firestore.admin.v1.Get" + + "BackupRequest\032!.google.firestore.admin.v" + + "1.Backup\":\332A\004name\202\323\344\223\002-\022+/v1/{name=proje" + + "cts/*/locations/*/backups/*}\022\252\001\n\013ListBac" + + "kups\022-.google.firestore.admin.v1.ListBac" + + "kupsRequest\032..google.firestore.admin.v1." + + "ListBackupsResponse\"<\332A\006parent\202\323\344\223\002-\022+/v" + + "1/{parent=projects/*/locations/*}/backup" + + "s\022\222\001\n\014DeleteBackup\022..google.firestore.ad" + + "min.v1.DeleteBackupRequest\032\026.google.prot" + + "obuf.Empty\":\332A\004name\202\323\344\223\002-*+/v1/{name=pro" + + "jects/*/locations/*/backups/*}\022\277\001\n\017Resto" + + "reDatabase\0221.google.firestore.admin.v1.R" + + "estoreDatabaseRequest\032\035.google.longrunni" + + "ng.Operation\"Z\312A#\n\010Database\022\027RestoreData" + + "baseMetadata\202\323\344\223\002.\")/v1/{parent=projects" + + "/*}/databases:restore:\001*\022\340\001\n\024CreateBacku" + + "pSchedule\0226.google.firestore.admin.v1.Cr" + + "eateBackupScheduleRequest\032).google.fires" + + "tore.admin.v1.BackupSchedule\"e\332A\026parent," + + "backup_schedule\202\323\344\223\002F\"3/v1/{parent=proje" + + "cts/*/databases/*}/backupSchedules:\017back" + + "up_schedule\022\267\001\n\021GetBackupSchedule\0223.goog" + + "le.firestore.admin.v1.GetBackupScheduleR" + + "equest\032).google.firestore.admin.v1.Backu" + + "pSchedule\"B\332A\004name\202\323\344\223\0025\0223/v1/{name=proj" + + "ects/*/databases/*/backupSchedules/*}\022\312\001" + + "\n\023ListBackupSchedules\0225.google.firestore" + + ".admin.v1.ListBackupSchedulesRequest\0326.g" + + "oogle.firestore.admin.v1.ListBackupSched" + + "ulesResponse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{pare" + + "nt=projects/*/databases/*}/backupSchedul" + + "es\022\365\001\n\024UpdateBackupSchedule\0226.google.fir" + + "estore.admin.v1.UpdateBackupScheduleRequ" + + "est\032).google.firestore.admin.v1.BackupSc" + + "hedule\"z\332A\033backup_schedule,update_mask\202\323" + + "\344\223\002V2C/v1/{backup_schedule.name=projects" + + "/*/databases/*/backupSchedules/*}:\017backu" + + "p_schedule\022\252\001\n\024DeleteBackupSchedule\0226.go" + + "ogle.firestore.admin.v1.DeleteBackupSche" + + "duleRequest\032\026.google.protobuf.Empty\"B\332A\004" + + "name\202\323\344\223\0025*3/v1/{name=projects/*/databas" + + "es/*/backupSchedules/*}\022\267\002\n\rCloneDatabas" + + "e\022/.google.firestore.admin.v1.CloneDatab" + + "aseRequest\032\035.google.longrunning.Operatio" + + "n\"\325\001\312A!\n\010Database\022\025CloneDatabaseMetadata" + + "\202\323\344\223\002,\"\'/v1/{parent=projects/*}/database" + + "s:clone:\001*\212\323\344\223\002y\0224\n\026pitr_snapshot.databa" + + "se\022\032projects/{project_id=*}/**\022A\n\026pitr_s" + + "napshot.database\022\'projects/*/databases/{" + + "database_id=*}/**\032v\312A\030firestore.googleap" + + "is.com\322AXhttps://www.googleapis.com/auth" + + "/cloud-platform,https://www.googleapis.c" + + "om/auth/datastoreB\245\003\n\035com.google.firesto" + + "re.admin.v1B\023FirestoreAdminProtoP\001Z9clou" + + "d.google.com/go/firestore/apiv1/admin/ad" + + "minpb;adminpb\242\002\004GCFS\252\002\037Google.Cloud.Fire" + + "store.Admin.V1\312\002\037Google\\Cloud\\Firestore\\" + + "Admin\\V1\352\002#Google::Cloud::Firestore::Adm" + + "in::V1\352AL\n!firestore.googleapis.com/Loca" + + "tion\022\'projects/{project}/locations/{loca" + + "tion}\352Aq\n(firestore.googleapis.com/Colle" + + "ctionGroup\022Eprojects/{project}/databases" + + "/{database}/collectionGroups/{collection" + + "}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -411,12 +532,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.api.RoutingProto.getDescriptor(), com.google.firestore.admin.v1.BackupProto.getDescriptor(), com.google.firestore.admin.v1.DatabaseProto.getDescriptor(), com.google.firestore.admin.v1.FieldProto.getDescriptor(), com.google.firestore.admin.v1.IndexProto.getDescriptor(), com.google.firestore.admin.v1.OperationProto.getDescriptor(), com.google.firestore.admin.v1.ScheduleProto.getDescriptor(), + com.google.firestore.admin.v1.PitrSnapshotProto.getDescriptor(), + com.google.firestore.admin.v1.UserCredsProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -488,8 +612,72 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_DeleteDatabaseMetadata_descriptor, new java.lang.String[] {}); - internal_static_google_firestore_admin_v1_CreateBackupScheduleRequest_descriptor = + internal_static_google_firestore_admin_v1_CreateUserCredsRequest_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_google_firestore_admin_v1_CreateUserCredsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_CreateUserCredsRequest_descriptor, + new java.lang.String[] { + "Parent", "UserCreds", "UserCredsId", + }); + internal_static_google_firestore_admin_v1_GetUserCredsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_firestore_admin_v1_GetUserCredsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_GetUserCredsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_ListUserCredsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_firestore_admin_v1_ListUserCredsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ListUserCredsRequest_descriptor, + new java.lang.String[] { + "Parent", + }); + internal_static_google_firestore_admin_v1_ListUserCredsResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_firestore_admin_v1_ListUserCredsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ListUserCredsResponse_descriptor, + new java.lang.String[] { + "UserCreds", + }); + internal_static_google_firestore_admin_v1_EnableUserCredsRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_firestore_admin_v1_EnableUserCredsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_EnableUserCredsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_DisableUserCredsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_firestore_admin_v1_DisableUserCredsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_DisableUserCredsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_DeleteUserCredsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_CreateBackupScheduleRequest_descriptor = + getDescriptor().getMessageTypes().get(17); internal_static_google_firestore_admin_v1_CreateBackupScheduleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_CreateBackupScheduleRequest_descriptor, @@ -497,7 +685,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "BackupSchedule", }); internal_static_google_firestore_admin_v1_GetBackupScheduleRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(18); internal_static_google_firestore_admin_v1_GetBackupScheduleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_GetBackupScheduleRequest_descriptor, @@ -505,7 +693,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_firestore_admin_v1_UpdateBackupScheduleRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(19); internal_static_google_firestore_admin_v1_UpdateBackupScheduleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_UpdateBackupScheduleRequest_descriptor, @@ -513,7 +701,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BackupSchedule", "UpdateMask", }); internal_static_google_firestore_admin_v1_ListBackupSchedulesRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(20); internal_static_google_firestore_admin_v1_ListBackupSchedulesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListBackupSchedulesRequest_descriptor, @@ -521,7 +709,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", }); internal_static_google_firestore_admin_v1_ListBackupSchedulesResponse_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(21); internal_static_google_firestore_admin_v1_ListBackupSchedulesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListBackupSchedulesResponse_descriptor, @@ -529,7 +717,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BackupSchedules", }); internal_static_google_firestore_admin_v1_DeleteBackupScheduleRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(22); internal_static_google_firestore_admin_v1_DeleteBackupScheduleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_DeleteBackupScheduleRequest_descriptor, @@ -537,7 +725,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(23); internal_static_google_firestore_admin_v1_CreateIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor, @@ -545,7 +733,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Index", }); internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(24); internal_static_google_firestore_admin_v1_ListIndexesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor, @@ -553,7 +741,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(25); internal_static_google_firestore_admin_v1_ListIndexesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor, @@ -561,7 +749,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Indexes", "NextPageToken", }); internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(26); internal_static_google_firestore_admin_v1_GetIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor, @@ -569,7 +757,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(27); internal_static_google_firestore_admin_v1_DeleteIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor, @@ -577,7 +765,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(28); internal_static_google_firestore_admin_v1_UpdateFieldRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor, @@ -585,7 +773,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Field", "UpdateMask", }); internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(29); internal_static_google_firestore_admin_v1_GetFieldRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor, @@ -593,7 +781,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(30); internal_static_google_firestore_admin_v1_ListFieldsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor, @@ -601,7 +789,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(31); internal_static_google_firestore_admin_v1_ListFieldsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor, @@ -609,7 +797,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Fields", "NextPageToken", }); internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(32); internal_static_google_firestore_admin_v1_ExportDocumentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor, @@ -617,7 +805,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CollectionIds", "OutputUriPrefix", "NamespaceIds", "SnapshotTime", }); internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(33); internal_static_google_firestore_admin_v1_ImportDocumentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor, @@ -625,7 +813,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CollectionIds", "InputUriPrefix", "NamespaceIds", }); internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(34); internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor, @@ -633,13 +821,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CollectionIds", "NamespaceIds", }); internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(35); internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor, new java.lang.String[] {}); internal_static_google_firestore_admin_v1_GetBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(36); internal_static_google_firestore_admin_v1_GetBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_GetBackupRequest_descriptor, @@ -647,15 +835,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_firestore_admin_v1_ListBackupsRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(37); internal_static_google_firestore_admin_v1_ListBackupsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListBackupsRequest_descriptor, new java.lang.String[] { - "Parent", + "Parent", "Filter", }); internal_static_google_firestore_admin_v1_ListBackupsResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(38); internal_static_google_firestore_admin_v1_ListBackupsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ListBackupsResponse_descriptor, @@ -663,7 +851,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Backups", "Unreachable", }); internal_static_google_firestore_admin_v1_DeleteBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(39); internal_static_google_firestore_admin_v1_DeleteBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_DeleteBackupRequest_descriptor, @@ -671,12 +859,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(40); internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor, new java.lang.String[] { - "Parent", "DatabaseId", "Backup", + "Parent", "DatabaseId", "Backup", "EncryptionConfig", "Tags", + }); + internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_TagsEntry_descriptor = + internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_descriptor, + new java.lang.String[] { + "Parent", "DatabaseId", "PitrSnapshot", "EncryptionConfig", "Tags", + }); + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_TagsEntry_descriptor = + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_CloneDatabaseRequest_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); @@ -687,6 +903,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.api.RoutingProto.routing); registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); @@ -694,12 +911,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.api.RoutingProto.getDescriptor(); com.google.firestore.admin.v1.BackupProto.getDescriptor(); com.google.firestore.admin.v1.DatabaseProto.getDescriptor(); com.google.firestore.admin.v1.FieldProto.getDescriptor(); com.google.firestore.admin.v1.IndexProto.getDescriptor(); com.google.firestore.admin.v1.OperationProto.getDescriptor(); com.google.firestore.admin.v1.ScheduleProto.getDescriptor(); + com.google.firestore.admin.v1.PitrSnapshotProto.getDescriptor(); + com.google.firestore.admin.v1.UserCredsProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequest.java index e9be92d06..802895193 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class GetBackupRequest extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetBackupRequest) GetBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetBackupRequest.newBuilder() to construct. private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -282,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -466,6 +470,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -492,6 +497,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -518,6 +524,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -543,6 +550,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -564,6 +572,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequestOrBuilder.java index a475a5173..442599ce3 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface GetBackupRequestOrBuilder @@ -40,6 +40,7 @@ public interface GetBackupRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequest.java index 18a4ad0ee..bba31b36c 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class GetBackupScheduleRequest extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetBackupScheduleRequest) GetBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetBackupScheduleRequest.newBuilder() to construct. private GetBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -285,6 +288,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -470,6 +474,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -497,6 +502,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -524,6 +530,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -550,6 +557,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -572,6 +580,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequestOrBuilder.java index 6c33e1e67..7a631b39e 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetBackupScheduleRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface GetBackupScheduleRequestOrBuilder @@ -41,6 +41,7 @@ public interface GetBackupScheduleRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequest.java index c399f6caf..4cee57555 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class GetDatabaseRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetDatabaseRequest) GetDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetDatabaseRequest.newBuilder() to construct. private GetDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -280,6 +283,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -465,6 +469,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -490,6 +495,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -515,6 +521,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -539,6 +546,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -559,6 +567,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequestOrBuilder.java index fb9a68884..9fe95d8a3 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetDatabaseRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface GetDatabaseRequestOrBuilder @@ -39,6 +39,7 @@ public interface GetDatabaseRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java index 3d3403da4..70bfe3da5 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class GetFieldRequest extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetFieldRequest) GetFieldRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetFieldRequest.newBuilder() to construct. private GetFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -280,6 +283,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -464,6 +468,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -489,6 +494,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -514,6 +520,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -538,6 +545,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -558,6 +566,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.java index 396a92d77..65a637672 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface GetFieldRequestOrBuilder @@ -39,6 +39,7 @@ public interface GetFieldRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java index 4b9685af2..68750edf1 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class GetIndexRequest extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetIndexRequest) GetIndexRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetIndexRequest.newBuilder() to construct. private GetIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -280,6 +283,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -464,6 +468,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -489,6 +494,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -514,6 +520,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -538,6 +545,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -558,6 +566,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.java index 46be45081..117528cb8 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface GetIndexRequestOrBuilder @@ -39,6 +39,7 @@ public interface GetIndexRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetUserCredsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetUserCredsRequest.java new file mode 100644 index 000000000..1649f9ea4 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetUserCredsRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.GetUserCreds][google.firestore.admin.v1.FirestoreAdmin.GetUserCreds].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.GetUserCredsRequest} + */ +public final class GetUserCredsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetUserCredsRequest) + GetUserCredsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetUserCredsRequest.newBuilder() to construct. + private GetUserCredsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetUserCredsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetUserCredsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.GetUserCredsRequest.class, + com.google.firestore.admin.v1.GetUserCredsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.GetUserCredsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.GetUserCredsRequest other = + (com.google.firestore.admin.v1.GetUserCredsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.GetUserCredsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [FirestoreAdmin.GetUserCreds][google.firestore.admin.v1.FirestoreAdmin.GetUserCreds].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.GetUserCredsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.GetUserCredsRequest) + com.google.firestore.admin.v1.GetUserCredsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.GetUserCredsRequest.class, + com.google.firestore.admin.v1.GetUserCredsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.GetUserCredsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetUserCredsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetUserCredsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.GetUserCredsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetUserCredsRequest build() { + com.google.firestore.admin.v1.GetUserCredsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetUserCredsRequest buildPartial() { + com.google.firestore.admin.v1.GetUserCredsRequest result = + new com.google.firestore.admin.v1.GetUserCredsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.GetUserCredsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.GetUserCredsRequest) { + return mergeFrom((com.google.firestore.admin.v1.GetUserCredsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.GetUserCredsRequest other) { + if (other == com.google.firestore.admin.v1.GetUserCredsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.GetUserCredsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.GetUserCredsRequest) + private static final com.google.firestore.admin.v1.GetUserCredsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.GetUserCredsRequest(); + } + + public static com.google.firestore.admin.v1.GetUserCredsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetUserCredsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetUserCredsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetUserCredsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetUserCredsRequestOrBuilder.java new file mode 100644 index 000000000..2e3f5bddd --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetUserCredsRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface GetUserCredsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.GetUserCredsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java index e556c616d..a9ba56fa6 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -35,6 +35,7 @@ public final class ImportDocumentsMetadata extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ImportDocumentsMetadata) ImportDocumentsMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use ImportDocumentsMetadata.newBuilder() to construct. private ImportDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int START_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -86,6 +88,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -101,6 +104,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -117,6 +121,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -133,6 +138,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -149,6 +155,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -166,6 +173,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int OPERATION_STATE_FIELD_NUMBER = 3; private int operationState_ = 0; + /** * * @@ -181,6 +189,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -201,6 +210,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 4; private com.google.firestore.admin.v1.Progress progressDocuments_; + /** * * @@ -216,6 +226,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -233,6 +244,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressDocuments_; } + /** * * @@ -251,6 +263,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public static final int PROGRESS_BYTES_FIELD_NUMBER = 5; private com.google.firestore.admin.v1.Progress progressBytes_; + /** * * @@ -266,6 +279,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -283,6 +297,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressBytes_; } + /** * * @@ -304,11 +319,12 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -318,11 +334,12 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder public com.google.protobuf.ProtocolStringList getCollectionIdsList() { return collectionIds_; } + /** * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -332,11 +349,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -347,11 +365,12 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -367,6 +386,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object inputUriPrefix_ = ""; + /** * * @@ -390,6 +410,7 @@ public java.lang.String getInputUriPrefix() { return s; } } + /** * * @@ -419,11 +440,12 @@ public com.google.protobuf.ByteString getInputUriPrefixBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; @@ -433,11 +455,12 @@ public com.google.protobuf.ByteString getInputUriPrefixBytes() { public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { return namespaceIds_; } + /** * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; @@ -447,11 +470,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; @@ -462,11 +486,12 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; @@ -737,6 +762,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1076,6 +1102,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -1090,6 +1117,7 @@ public Builder mergeFrom( public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1108,6 +1136,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -1130,6 +1159,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1149,6 +1179,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1176,6 +1207,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1195,6 +1227,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1209,6 +1242,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1225,6 +1259,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1257,6 +1292,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1272,6 +1308,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1291,6 +1328,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1314,6 +1352,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1334,6 +1373,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1362,6 +1402,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1382,6 +1423,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1397,6 +1439,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1414,6 +1457,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1442,6 +1486,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private int operationState_ = 0; + /** * * @@ -1457,6 +1502,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -1475,6 +1521,7 @@ public Builder setOperationStateValue(int value) { onChanged(); return this; } + /** * * @@ -1492,6 +1539,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { com.google.firestore.admin.v1.OperationState.forNumber(operationState_); return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; } + /** * * @@ -1513,6 +1561,7 @@ public Builder setOperationState(com.google.firestore.admin.v1.OperationState va onChanged(); return this; } + /** * * @@ -1537,6 +1586,7 @@ public Builder clearOperationState() { com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressDocumentsBuilder_; + /** * * @@ -1551,6 +1601,7 @@ public Builder clearOperationState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1571,6 +1622,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocumentsBuilder_.getMessage(); } } + /** * * @@ -1593,6 +1645,7 @@ public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value onChanged(); return this; } + /** * * @@ -1613,6 +1666,7 @@ public Builder setProgressDocuments( onChanged(); return this; } + /** * * @@ -1640,6 +1694,7 @@ public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress val } return this; } + /** * * @@ -1659,6 +1714,7 @@ public Builder clearProgressDocuments() { onChanged(); return this; } + /** * * @@ -1673,6 +1729,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilde onChanged(); return getProgressDocumentsFieldBuilder().getBuilder(); } + /** * * @@ -1691,6 +1748,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui : progressDocuments_; } } + /** * * @@ -1723,6 +1781,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressBytesBuilder_; + /** * * @@ -1737,6 +1796,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1757,6 +1817,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytesBuilder_.getMessage(); } } + /** * * @@ -1779,6 +1840,7 @@ public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { onChanged(); return this; } + /** * * @@ -1799,6 +1861,7 @@ public Builder setProgressBytes( onChanged(); return this; } + /** * * @@ -1826,6 +1889,7 @@ public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) } return this; } + /** * * @@ -1845,6 +1909,7 @@ public Builder clearProgressBytes() { onChanged(); return this; } + /** * * @@ -1859,6 +1924,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() onChanged(); return getProgressBytesFieldBuilder().getBuilder(); } + /** * * @@ -1877,6 +1943,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder : progressBytes_; } } + /** * * @@ -1912,11 +1979,12 @@ private void ensureCollectionIdsIsMutable() { } bitField0_ |= 0x00000020; } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -1927,11 +1995,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { collectionIds_.makeImmutable(); return collectionIds_; } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -1941,11 +2010,12 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -1956,11 +2026,12 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -1971,11 +2042,12 @@ public java.lang.String getCollectionIds(int index) { public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { return collectionIds_.getByteString(index); } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -1994,11 +2066,12 @@ public Builder setCollectionIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -2016,11 +2089,12 @@ public Builder addCollectionIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -2035,11 +2109,12 @@ public Builder addAllCollectionIds(java.lang.Iterable values) onChanged(); return this; } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -2053,11 +2128,12 @@ public Builder clearCollectionIds() { onChanged(); return this; } + /** * * *
-     * Which collection ids are being imported.
+     * Which collection IDs are being imported.
      * 
* * repeated string collection_ids = 6; @@ -2078,6 +2154,7 @@ public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object inputUriPrefix_ = ""; + /** * * @@ -2100,6 +2177,7 @@ public java.lang.String getInputUriPrefix() { return (java.lang.String) ref; } } + /** * * @@ -2122,6 +2200,7 @@ public com.google.protobuf.ByteString getInputUriPrefixBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2143,6 +2222,7 @@ public Builder setInputUriPrefix(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2160,6 +2240,7 @@ public Builder clearInputUriPrefix() { onChanged(); return this; } + /** * * @@ -2192,11 +2273,12 @@ private void ensureNamespaceIdsIsMutable() { } bitField0_ |= 0x00000080; } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2207,11 +2289,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { namespaceIds_.makeImmutable(); return namespaceIds_; } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2221,11 +2304,12 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2236,11 +2320,12 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2251,11 +2336,12 @@ public java.lang.String getNamespaceIds(int index) { public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { return namespaceIds_.getByteString(index); } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2274,11 +2360,12 @@ public Builder setNamespaceIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2296,11 +2383,12 @@ public Builder addNamespaceIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2315,11 +2403,12 @@ public Builder addAllNamespaceIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; @@ -2333,11 +2422,12 @@ public Builder clearNamespaceIds() { onChanged(); return this; } + /** * * *
-     * Which namespace ids are being imported.
+     * Which namespace IDs are being imported.
      * 
* * repeated string namespace_ids = 8; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.java index 9259e8391..20df269b1 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ImportDocumentsMetadataOrBuilder @@ -36,6 +36,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -48,6 +49,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -72,6 +74,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -85,6 +88,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -109,6 +113,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return The enum numeric value on the wire for operationState. */ int getOperationStateValue(); + /** * * @@ -134,6 +139,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return Whether the progressDocuments field is set. */ boolean hasProgressDocuments(); + /** * * @@ -146,6 +152,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return The progressDocuments. */ com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** * * @@ -169,6 +176,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return Whether the progressBytes field is set. */ boolean hasProgressBytes(); + /** * * @@ -181,6 +189,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return The progressBytes. */ com.google.firestore.admin.v1.Progress getProgressBytes(); + /** * * @@ -196,7 +205,7 @@ public interface ImportDocumentsMetadataOrBuilder * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -204,11 +213,12 @@ public interface ImportDocumentsMetadataOrBuilder * @return A list containing the collectionIds. */ java.util.List getCollectionIdsList(); + /** * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -216,11 +226,12 @@ public interface ImportDocumentsMetadataOrBuilder * @return The count of collectionIds. */ int getCollectionIdsCount(); + /** * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -229,11 +240,12 @@ public interface ImportDocumentsMetadataOrBuilder * @return The collectionIds at the given index. */ java.lang.String getCollectionIds(int index); + /** * * *
-   * Which collection ids are being imported.
+   * Which collection IDs are being imported.
    * 
* * repeated string collection_ids = 6; @@ -255,6 +267,7 @@ public interface ImportDocumentsMetadataOrBuilder * @return The inputUriPrefix. */ java.lang.String getInputUriPrefix(); + /** * * @@ -272,7 +285,7 @@ public interface ImportDocumentsMetadataOrBuilder * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; @@ -280,11 +293,12 @@ public interface ImportDocumentsMetadataOrBuilder * @return A list containing the namespaceIds. */ java.util.List getNamespaceIdsList(); + /** * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; @@ -292,11 +306,12 @@ public interface ImportDocumentsMetadataOrBuilder * @return The count of namespaceIds. */ int getNamespaceIdsCount(); + /** * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; @@ -305,11 +320,12 @@ public interface ImportDocumentsMetadataOrBuilder * @return The namespaceIds at the given index. */ java.lang.String getNamespaceIds(int index); + /** * * *
-   * Which namespace ids are being imported.
+   * Which namespace IDs are being imported.
    * 
* * repeated string namespace_ids = 8; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java index 7e7e7723c..1534c3a45 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ImportDocumentsRequest extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ImportDocumentsRequest) ImportDocumentsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ImportDocumentsRequest.newBuilder() to construct. private ImportDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -97,6 +99,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -129,12 +132,13 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -144,12 +148,13 @@ public com.google.protobuf.ByteString getNameBytes() { public com.google.protobuf.ProtocolStringList getCollectionIdsList() { return collectionIds_; } + /** * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -159,12 +164,13 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -175,12 +181,13 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -196,6 +203,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object inputUriPrefix_ = ""; + /** * * @@ -223,6 +231,7 @@ public java.lang.String getInputUriPrefix() { return s; } } + /** * * @@ -256,6 +265,7 @@ public com.google.protobuf.ByteString getInputUriPrefixBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -275,6 +285,7 @@ public com.google.protobuf.ByteString getInputUriPrefixBytes() { public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { return namespaceIds_; } + /** * * @@ -294,6 +305,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * @@ -314,6 +326,7 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * @@ -535,6 +548,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -779,6 +793,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -804,6 +819,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -829,6 +845,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -853,6 +870,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -873,6 +891,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -908,12 +927,13 @@ private void ensureCollectionIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -924,12 +944,13 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { collectionIds_.makeImmutable(); return collectionIds_; } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -939,12 +960,13 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -955,12 +977,13 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -971,12 +994,13 @@ public java.lang.String getCollectionIds(int index) { public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { return collectionIds_.getByteString(index); } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -995,12 +1019,13 @@ public Builder setCollectionIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1018,12 +1043,13 @@ public Builder addCollectionIds(java.lang.String value) { onChanged(); return this; } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1038,12 +1064,13 @@ public Builder addAllCollectionIds(java.lang.Iterable values) onChanged(); return this; } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1057,12 +1084,13 @@ public Builder clearCollectionIds() { onChanged(); return this; } + /** * * *
-     * Which collection ids to import. Unspecified means all collections included
-     * in the import. Each collection id in this list must be unique.
+     * Which collection IDs to import. Unspecified means all collections included
+     * in the import. Each collection ID in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1083,6 +1111,7 @@ public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object inputUriPrefix_ = ""; + /** * * @@ -1109,6 +1138,7 @@ public java.lang.String getInputUriPrefix() { return (java.lang.String) ref; } } + /** * * @@ -1135,6 +1165,7 @@ public com.google.protobuf.ByteString getInputUriPrefixBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1160,6 +1191,7 @@ public Builder setInputUriPrefix(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1181,6 +1213,7 @@ public Builder clearInputUriPrefix() { onChanged(); return this; } + /** * * @@ -1217,6 +1250,7 @@ private void ensureNamespaceIdsIsMutable() { } bitField0_ |= 0x00000008; } + /** * * @@ -1237,6 +1271,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { namespaceIds_.makeImmutable(); return namespaceIds_; } + /** * * @@ -1256,6 +1291,7 @@ public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { public int getNamespaceIdsCount() { return namespaceIds_.size(); } + /** * * @@ -1276,6 +1312,7 @@ public int getNamespaceIdsCount() { public java.lang.String getNamespaceIds(int index) { return namespaceIds_.get(index); } + /** * * @@ -1296,6 +1333,7 @@ public java.lang.String getNamespaceIds(int index) { public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { return namespaceIds_.getByteString(index); } + /** * * @@ -1324,6 +1362,7 @@ public Builder setNamespaceIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1351,6 +1390,7 @@ public Builder addNamespaceIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1375,6 +1415,7 @@ public Builder addAllNamespaceIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -1398,6 +1439,7 @@ public Builder clearNamespaceIds() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java index 912935b15..ab89ee5b4 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ImportDocumentsRequestOrBuilder @@ -39,6 +39,7 @@ public interface ImportDocumentsRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -59,8 +60,8 @@ public interface ImportDocumentsRequestOrBuilder * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -68,12 +69,13 @@ public interface ImportDocumentsRequestOrBuilder * @return A list containing the collectionIds. */ java.util.List getCollectionIdsList(); + /** * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -81,12 +83,13 @@ public interface ImportDocumentsRequestOrBuilder * @return The count of collectionIds. */ int getCollectionIdsCount(); + /** * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -95,12 +98,13 @@ public interface ImportDocumentsRequestOrBuilder * @return The collectionIds at the given index. */ java.lang.String getCollectionIds(int index); + /** * * *
-   * Which collection ids to import. Unspecified means all collections included
-   * in the import. Each collection id in this list must be unique.
+   * Which collection IDs to import. Unspecified means all collections included
+   * in the import. Each collection ID in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -126,6 +130,7 @@ public interface ImportDocumentsRequestOrBuilder * @return The inputUriPrefix. */ java.lang.String getInputUriPrefix(); + /** * * @@ -160,6 +165,7 @@ public interface ImportDocumentsRequestOrBuilder * @return A list containing the namespaceIds. */ java.util.List getNamespaceIdsList(); + /** * * @@ -177,6 +183,7 @@ public interface ImportDocumentsRequestOrBuilder * @return The count of namespaceIds. */ int getNamespaceIdsCount(); + /** * * @@ -195,6 +202,7 @@ public interface ImportDocumentsRequestOrBuilder * @return The namespaceIds at the given index. */ java.lang.String getNamespaceIds(int index); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java index 435dbcf87..ef6764dc8 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/index.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class Index extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index) IndexOrBuilder { private static final long serialVersionUID = 0L; + // Use Index.newBuilder() to construct. private Index(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -45,6 +46,7 @@ private Index() { apiScope_ = 0; fields_ = java.util.Collections.emptyList(); state_ = 0; + density_ = 0; } @java.lang.Override @@ -95,7 +97,7 @@ public enum QueryScope implements com.google.protobuf.ProtocolMessageEnum { *
      * Indexes with a collection query scope specified allow queries
      * against a collection that is the child of a specific document, specified
-     * at query time, and that has the collection id specified by the index.
+     * at query time, and that has the collection ID specified by the index.
      * 
* * COLLECTION = 1; @@ -106,7 +108,7 @@ public enum QueryScope implements com.google.protobuf.ProtocolMessageEnum { * *
      * Indexes with a collection group query scope specified allow queries
-     * against all collections that has the collection id specified by the
+     * against all collections that has the collection ID specified by the
      * index.
      * 
* @@ -137,30 +139,33 @@ public enum QueryScope implements com.google.protobuf.ProtocolMessageEnum { * QUERY_SCOPE_UNSPECIFIED = 0; */ public static final int QUERY_SCOPE_UNSPECIFIED_VALUE = 0; + /** * * *
      * Indexes with a collection query scope specified allow queries
      * against a collection that is the child of a specific document, specified
-     * at query time, and that has the collection id specified by the index.
+     * at query time, and that has the collection ID specified by the index.
      * 
* * COLLECTION = 1; */ public static final int COLLECTION_VALUE = 1; + /** * * *
      * Indexes with a collection group query scope specified allow queries
-     * against all collections that has the collection id specified by the
+     * against all collections that has the collection ID specified by the
      * index.
      * 
* * COLLECTION_GROUP = 2; */ public static final int COLLECTION_GROUP_VALUE = 2; + /** * * @@ -290,6 +295,16 @@ public enum ApiScope implements com.google.protobuf.ProtocolMessageEnum { * DATASTORE_MODE_API = 1; */ DATASTORE_MODE_API(1), + /** + * + * + *
+     * The index can only be used by the MONGODB_COMPATIBLE_API.
+     * 
+ * + * MONGODB_COMPATIBLE_API = 2; + */ + MONGODB_COMPATIBLE_API(2), UNRECOGNIZED(-1), ; @@ -304,6 +319,7 @@ public enum ApiScope implements com.google.protobuf.ProtocolMessageEnum { * ANY_API = 0; */ public static final int ANY_API_VALUE = 0; + /** * * @@ -315,6 +331,17 @@ public enum ApiScope implements com.google.protobuf.ProtocolMessageEnum { */ public static final int DATASTORE_MODE_API_VALUE = 1; + /** + * + * + *
+     * The index can only be used by the MONGODB_COMPATIBLE_API.
+     * 
+ * + * MONGODB_COMPATIBLE_API = 2; + */ + public static final int MONGODB_COMPATIBLE_API_VALUE = 2; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -343,6 +370,8 @@ public static ApiScope forNumber(int value) { return ANY_API; case 1: return DATASTORE_MODE_API; + case 2: + return MONGODB_COMPATIBLE_API; default: return null; } @@ -474,6 +503,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -487,6 +517,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CREATING = 1; */ public static final int CREATING_VALUE = 1; + /** * * @@ -499,6 +530,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 2; */ public static final int READY_VALUE = 2; + /** * * @@ -602,6 +634,210 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.State) } + /** + * + * + *
+   * The density configuration for the index.
+   * 
+ * + * Protobuf enum {@code google.firestore.admin.v1.Index.Density} + */ + public enum Density implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified. It will use database default setting. This value is input
+     * only.
+     * 
+ * + * DENSITY_UNSPECIFIED = 0; + */ + DENSITY_UNSPECIFIED(0), + /** + * + * + *
+     * In order for an index entry to be added, the document must
+     * contain all fields specified in the index.
+     *
+     * This is the only allowed value for indexes having ApiScope `ANY_API` and
+     * `DATASTORE_MODE_API`.
+     * 
+ * + * SPARSE_ALL = 1; + */ + SPARSE_ALL(1), + /** + * + * + *
+     * In order for an index entry to be added, the document must
+     * contain at least one of the fields specified in the index.
+     * Non-existent fields are treated as having a NULL value when generating
+     * index entries.
+     * 
+ * + * SPARSE_ANY = 2; + */ + SPARSE_ANY(2), + /** + * + * + *
+     * An index entry will be added regardless of whether the
+     * document contains any of the fields specified in the index.
+     * Non-existent fields are treated as having a NULL value when generating
+     * index entries.
+     * 
+ * + * DENSE = 3; + */ + DENSE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified. It will use database default setting. This value is input
+     * only.
+     * 
+ * + * DENSITY_UNSPECIFIED = 0; + */ + public static final int DENSITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * In order for an index entry to be added, the document must
+     * contain all fields specified in the index.
+     *
+     * This is the only allowed value for indexes having ApiScope `ANY_API` and
+     * `DATASTORE_MODE_API`.
+     * 
+ * + * SPARSE_ALL = 1; + */ + public static final int SPARSE_ALL_VALUE = 1; + + /** + * + * + *
+     * In order for an index entry to be added, the document must
+     * contain at least one of the fields specified in the index.
+     * Non-existent fields are treated as having a NULL value when generating
+     * index entries.
+     * 
+ * + * SPARSE_ANY = 2; + */ + public static final int SPARSE_ANY_VALUE = 2; + + /** + * + * + *
+     * An index entry will be added regardless of whether the
+     * document contains any of the fields specified in the index.
+     * Non-existent fields are treated as having a NULL value when generating
+     * index entries.
+     * 
+ * + * DENSE = 3; + */ + public static final int DENSE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Density valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Density forNumber(int value) { + switch (value) { + case 0: + return DENSITY_UNSPECIFIED; + case 1: + return SPARSE_ALL; + case 2: + return SPARSE_ANY; + case 3: + return DENSE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Density findValueByNumber(int number) { + return Density.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.Index.getDescriptor().getEnumTypes().get(3); + } + + private static final Density[] VALUES = values(); + + public static Density valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Density(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.Density) + } + public interface IndexFieldOrBuilder extends // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.IndexField) @@ -621,6 +857,7 @@ public interface IndexFieldOrBuilder * @return The fieldPath. */ java.lang.String getFieldPath(); + /** * * @@ -649,6 +886,7 @@ public interface IndexFieldOrBuilder * @return Whether the order field is set. */ boolean hasOrder(); + /** * * @@ -662,6 +900,7 @@ public interface IndexFieldOrBuilder * @return The enum numeric value on the wire for order. */ int getOrderValue(); + /** * * @@ -688,6 +927,7 @@ public interface IndexFieldOrBuilder * @return Whether the arrayConfig field is set. */ boolean hasArrayConfig(); + /** * * @@ -700,6 +940,7 @@ public interface IndexFieldOrBuilder * @return The enum numeric value on the wire for arrayConfig. */ int getArrayConfigValue(); + /** * * @@ -726,6 +967,7 @@ public interface IndexFieldOrBuilder * @return Whether the vectorConfig field is set. */ boolean hasVectorConfig(); + /** * * @@ -739,6 +981,7 @@ public interface IndexFieldOrBuilder * @return The vectorConfig. */ com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConfig(); + /** * * @@ -753,6 +996,7 @@ public interface IndexFieldOrBuilder com.google.firestore.admin.v1.Index.IndexField.ValueModeCase getValueModeCase(); } + /** * * @@ -769,6 +1013,7 @@ public static final class IndexField extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField) IndexFieldOrBuilder { private static final long serialVersionUID = 0L; + // Use IndexField.newBuilder() to construct. private IndexField(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -852,6 +1097,7 @@ public enum Order implements com.google.protobuf.ProtocolMessageEnum { * ORDER_UNSPECIFIED = 0; */ public static final int ORDER_UNSPECIFIED_VALUE = 0; + /** * * @@ -862,6 +1108,7 @@ public enum Order implements com.google.protobuf.ProtocolMessageEnum { * ASCENDING = 1; */ public static final int ASCENDING_VALUE = 1; + /** * * @@ -999,6 +1246,7 @@ public enum ArrayConfig implements com.google.protobuf.ProtocolMessageEnum { * ARRAY_CONFIG_UNSPECIFIED = 0; */ public static final int ARRAY_CONFIG_UNSPECIFIED_VALUE = 0; + /** * * @@ -1124,6 +1372,7 @@ public interface VectorConfigOrBuilder * @return Whether the flat field is set. */ boolean hasFlat(); + /** * * @@ -1136,6 +1385,7 @@ public interface VectorConfigOrBuilder * @return The flat. */ com.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex getFlat(); + /** * * @@ -1150,6 +1400,7 @@ public interface VectorConfigOrBuilder com.google.firestore.admin.v1.Index.IndexField.VectorConfig.TypeCase getTypeCase(); } + /** * * @@ -1164,6 +1415,7 @@ public static final class VectorConfig extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField.VectorConfig) VectorConfigOrBuilder { private static final long serialVersionUID = 0L; + // Use VectorConfig.newBuilder() to construct. private VectorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1196,6 +1448,7 @@ public interface FlatIndexOrBuilder extends // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -1211,6 +1464,7 @@ public static final class FlatIndex extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex) FlatIndexOrBuilder { private static final long serialVersionUID = 0L; + // Use FlatIndex.newBuilder() to construct. private FlatIndex(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1404,6 +1658,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1660,6 +1915,7 @@ public enum TypeCase private TypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -1692,6 +1948,7 @@ public TypeCase getTypeCase() { public static final int DIMENSION_FIELD_NUMBER = 1; private int dimension_ = 0; + /** * * @@ -1712,6 +1969,7 @@ public int getDimension() { } public static final int FLAT_FIELD_NUMBER = 2; + /** * * @@ -1727,6 +1985,7 @@ public int getDimension() { public boolean hasFlat() { return typeCase_ == 2; } + /** * * @@ -1746,6 +2005,7 @@ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex get return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex .getDefaultInstance(); } + /** * * @@ -1951,6 +2211,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -2186,6 +2447,7 @@ public Builder clearType() { private int bitField0_; private int dimension_; + /** * * @@ -2204,6 +2466,7 @@ public Builder clearType() { public int getDimension() { return dimension_; } + /** * * @@ -2226,6 +2489,7 @@ public Builder setDimension(int value) { onChanged(); return this; } + /** * * @@ -2252,6 +2516,7 @@ public Builder clearDimension() { com.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex.Builder, com.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndexOrBuilder> flatBuilder_; + /** * * @@ -2267,6 +2532,7 @@ public Builder clearDimension() { public boolean hasFlat() { return typeCase_ == 2; } + /** * * @@ -2294,6 +2560,7 @@ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex get .getDefaultInstance(); } } + /** * * @@ -2317,6 +2584,7 @@ public Builder setFlat( typeCase_ = 2; return this; } + /** * * @@ -2338,6 +2606,7 @@ public Builder setFlat( typeCase_ = 2; return this; } + /** * * @@ -2374,6 +2643,7 @@ public Builder mergeFlat( typeCase_ = 2; return this; } + /** * * @@ -2399,6 +2669,7 @@ public Builder clearFlat() { } return this; } + /** * * @@ -2412,6 +2683,7 @@ public Builder clearFlat() { getFlatBuilder() { return getFlatFieldBuilder().getBuilder(); } + /** * * @@ -2434,6 +2706,7 @@ public Builder clearFlat() { .getDefaultInstance(); } } + /** * * @@ -2554,6 +2827,7 @@ public enum ValueModeCase private ValueModeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2592,6 +2866,7 @@ public ValueModeCase getValueModeCase() { @SuppressWarnings("serial") private volatile java.lang.Object fieldPath_ = ""; + /** * * @@ -2617,6 +2892,7 @@ public java.lang.String getFieldPath() { return s; } } + /** * * @@ -2644,6 +2920,7 @@ public com.google.protobuf.ByteString getFieldPathBytes() { } public static final int ORDER_FIELD_NUMBER = 2; + /** * * @@ -2659,6 +2936,7 @@ public com.google.protobuf.ByteString getFieldPathBytes() { public boolean hasOrder() { return valueModeCase_ == 2; } + /** * * @@ -2677,6 +2955,7 @@ public int getOrderValue() { } return 0; } + /** * * @@ -2702,6 +2981,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() { } public static final int ARRAY_CONFIG_FIELD_NUMBER = 3; + /** * * @@ -2716,6 +2996,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() { public boolean hasArrayConfig() { return valueModeCase_ == 3; } + /** * * @@ -2733,6 +3014,7 @@ public int getArrayConfigValue() { } return 0; } + /** * * @@ -2757,6 +3039,7 @@ public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig } public static final int VECTOR_CONFIG_FIELD_NUMBER = 4; + /** * * @@ -2773,6 +3056,7 @@ public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig public boolean hasVectorConfig() { return valueModeCase_ == 4; } + /** * * @@ -2792,6 +3076,7 @@ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConf } return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance(); } + /** * * @@ -3026,6 +3311,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -3284,6 +3570,7 @@ public Builder clearValueMode() { private int bitField0_; private java.lang.Object fieldPath_ = ""; + /** * * @@ -3308,6 +3595,7 @@ public java.lang.String getFieldPath() { return (java.lang.String) ref; } } + /** * * @@ -3332,6 +3620,7 @@ public com.google.protobuf.ByteString getFieldPathBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3355,6 +3644,7 @@ public Builder setFieldPath(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3374,6 +3664,7 @@ public Builder clearFieldPath() { onChanged(); return this; } + /** * * @@ -3415,6 +3706,7 @@ public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { public boolean hasOrder() { return valueModeCase_ == 2; } + /** * * @@ -3434,6 +3726,7 @@ public int getOrderValue() { } return 0; } + /** * * @@ -3453,6 +3746,7 @@ public Builder setOrderValue(int value) { onChanged(); return this; } + /** * * @@ -3477,6 +3771,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() { } return com.google.firestore.admin.v1.Index.IndexField.Order.ORDER_UNSPECIFIED; } + /** * * @@ -3499,6 +3794,7 @@ public Builder setOrder(com.google.firestore.admin.v1.Index.IndexField.Order val onChanged(); return this; } + /** * * @@ -3535,6 +3831,7 @@ public Builder clearOrder() { public boolean hasArrayConfig() { return valueModeCase_ == 3; } + /** * * @@ -3553,6 +3850,7 @@ public int getArrayConfigValue() { } return 0; } + /** * * @@ -3571,6 +3869,7 @@ public Builder setArrayConfigValue(int value) { onChanged(); return this; } + /** * * @@ -3594,6 +3893,7 @@ public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig } return com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.ARRAY_CONFIG_UNSPECIFIED; } + /** * * @@ -3616,6 +3916,7 @@ public Builder setArrayConfig( onChanged(); return this; } + /** * * @@ -3641,6 +3942,7 @@ public Builder clearArrayConfig() { com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder, com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder> vectorConfigBuilder_; + /** * * @@ -3657,6 +3959,7 @@ public Builder clearArrayConfig() { public boolean hasVectorConfig() { return valueModeCase_ == 4; } + /** * * @@ -3683,6 +3986,7 @@ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConf return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance(); } } + /** * * @@ -3707,6 +4011,7 @@ public Builder setVectorConfig( valueModeCase_ = 4; return this; } + /** * * @@ -3728,6 +4033,7 @@ public Builder setVectorConfig( valueModeCase_ = 4; return this; } + /** * * @@ -3764,6 +4070,7 @@ public Builder mergeVectorConfig( valueModeCase_ = 4; return this; } + /** * * @@ -3790,6 +4097,7 @@ public Builder clearVectorConfig() { } return this; } + /** * * @@ -3804,6 +4112,7 @@ public Builder clearVectorConfig() { getVectorConfigBuilder() { return getVectorConfigFieldBuilder().getBuilder(); } + /** * * @@ -3826,6 +4135,7 @@ public Builder clearVectorConfig() { return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance(); } } + /** * * @@ -3929,6 +4239,7 @@ public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType( @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -3955,6 +4266,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -3984,17 +4296,18 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int QUERY_SCOPE_FIELD_NUMBER = 2; private int queryScope_ = 0; + /** * * *
    * Indexes with a collection query scope specified allow queries
    * against a collection that is the child of a specific document, specified at
-   * query time, and that has the same collection id.
+   * query time, and that has the same collection ID.
    *
    * Indexes with a collection group query scope specified allow queries against
    * all collections descended from a specific document, specified at query
-   * time, and that have the same collection id as this index.
+   * time, and that have the same collection ID as this index.
    * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -4005,17 +4318,18 @@ public com.google.protobuf.ByteString getNameBytes() { public int getQueryScopeValue() { return queryScope_; } + /** * * *
    * Indexes with a collection query scope specified allow queries
    * against a collection that is the child of a specific document, specified at
-   * query time, and that has the same collection id.
+   * query time, and that has the same collection ID.
    *
    * Indexes with a collection group query scope specified allow queries against
    * all collections descended from a specific document, specified at query
-   * time, and that have the same collection id as this index.
+   * time, and that have the same collection ID as this index.
    * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -4031,6 +4345,7 @@ public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { public static final int API_SCOPE_FIELD_NUMBER = 5; private int apiScope_ = 0; + /** * * @@ -4046,6 +4361,7 @@ public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { public int getApiScopeValue() { return apiScope_; } + /** * * @@ -4068,6 +4384,7 @@ public com.google.firestore.admin.v1.Index.ApiScope getApiScope() { @SuppressWarnings("serial") private java.util.List fields_; + /** * * @@ -4091,6 +4408,7 @@ public com.google.firestore.admin.v1.Index.ApiScope getApiScope() { public java.util.List getFieldsList() { return fields_; } + /** * * @@ -4115,6 +4433,7 @@ public java.util.List getFieldsL getFieldsOrBuilderList() { return fields_; } + /** * * @@ -4138,6 +4457,7 @@ public java.util.List getFieldsL public int getFieldsCount() { return fields_.size(); } + /** * * @@ -4161,6 +4481,7 @@ public int getFieldsCount() { public com.google.firestore.admin.v1.Index.IndexField getFields(int index) { return fields_.get(index); } + /** * * @@ -4187,6 +4508,7 @@ public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilde public static final int STATE_FIELD_NUMBER = 4; private int state_ = 0; + /** * * @@ -4202,6 +4524,7 @@ public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilde public int getStateValue() { return state_; } + /** * * @@ -4220,6 +4543,92 @@ public com.google.firestore.admin.v1.Index.State getState() { return result == null ? com.google.firestore.admin.v1.Index.State.UNRECOGNIZED : result; } + public static final int DENSITY_FIELD_NUMBER = 6; + private int density_ = 0; + + /** + * + * + *
+   * Immutable. The density configuration of the index.
+   * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for density. + */ + @java.lang.Override + public int getDensityValue() { + return density_; + } + + /** + * + * + *
+   * Immutable. The density configuration of the index.
+   * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The density. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Index.Density getDensity() { + com.google.firestore.admin.v1.Index.Density result = + com.google.firestore.admin.v1.Index.Density.forNumber(density_); + return result == null ? com.google.firestore.admin.v1.Index.Density.UNRECOGNIZED : result; + } + + public static final int MULTIKEY_FIELD_NUMBER = 7; + private boolean multikey_ = false; + + /** + * + * + *
+   * Optional. Whether the index is multikey. By default, the index is not
+   * multikey. For non-multikey indexes, none of the paths in the index
+   * definition reach or traverse an array, except via an explicit array index.
+   * For multikey indexes, at most one of the paths in the index definition
+   * reach or traverse an array, except via an explicit array index. Violations
+   * will result in errors.
+   *
+   * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.
+   * 
+ * + * bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The multikey. + */ + @java.lang.Override + public boolean getMultikey() { + return multikey_; + } + + public static final int SHARD_COUNT_FIELD_NUMBER = 8; + private int shardCount_ = 0; + + /** + * + * + *
+   * Optional. The number of shards for the index.
+   * 
+ * + * int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The shardCount. + */ + @java.lang.Override + public int getShardCount() { + return shardCount_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4250,6 +4659,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (apiScope_ != com.google.firestore.admin.v1.Index.ApiScope.ANY_API.getNumber()) { output.writeEnum(5, apiScope_); } + if (density_ != com.google.firestore.admin.v1.Index.Density.DENSITY_UNSPECIFIED.getNumber()) { + output.writeEnum(6, density_); + } + if (multikey_ != false) { + output.writeBool(7, multikey_); + } + if (shardCount_ != 0) { + output.writeInt32(8, shardCount_); + } getUnknownFields().writeTo(output); } @@ -4275,6 +4693,15 @@ public int getSerializedSize() { if (apiScope_ != com.google.firestore.admin.v1.Index.ApiScope.ANY_API.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, apiScope_); } + if (density_ != com.google.firestore.admin.v1.Index.Density.DENSITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, density_); + } + if (multikey_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, multikey_); + } + if (shardCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, shardCount_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4295,6 +4722,9 @@ public boolean equals(final java.lang.Object obj) { if (apiScope_ != other.apiScope_) return false; if (!getFieldsList().equals(other.getFieldsList())) return false; if (state_ != other.state_) return false; + if (density_ != other.density_) return false; + if (getMultikey() != other.getMultikey()) return false; + if (getShardCount() != other.getShardCount()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4318,6 +4748,12 @@ public int hashCode() { } hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; + hash = (37 * hash) + DENSITY_FIELD_NUMBER; + hash = (53 * hash) + density_; + hash = (37 * hash) + MULTIKEY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMultikey()); + hash = (37 * hash) + SHARD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getShardCount(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -4417,6 +4853,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -4468,6 +4905,9 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000008); state_ = 0; + density_ = 0; + multikey_ = false; + shardCount_ = 0; return this; } @@ -4528,6 +4968,15 @@ private void buildPartial0(com.google.firestore.admin.v1.Index result) { if (((from_bitField0_ & 0x00000010) != 0)) { result.state_ = state_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.density_ = density_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.multikey_ = multikey_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.shardCount_ = shardCount_; + } } @java.lang.Override @@ -4616,6 +5065,15 @@ public Builder mergeFrom(com.google.firestore.admin.v1.Index other) { if (other.state_ != 0) { setStateValue(other.getStateValue()); } + if (other.density_ != 0) { + setDensityValue(other.getDensityValue()); + } + if (other.getMultikey() != false) { + setMultikey(other.getMultikey()); + } + if (other.getShardCount() != 0) { + setShardCount(other.getShardCount()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4679,6 +5137,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 40 + case 48: + { + density_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + multikey_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + shardCount_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4699,6 +5175,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -4724,6 +5201,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -4749,6 +5227,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4773,6 +5252,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4793,6 +5273,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -4820,17 +5301,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int queryScope_ = 0; + /** * * *
      * Indexes with a collection query scope specified allow queries
      * against a collection that is the child of a specific document, specified at
-     * query time, and that has the same collection id.
+     * query time, and that has the same collection ID.
      *
      * Indexes with a collection group query scope specified allow queries against
      * all collections descended from a specific document, specified at query
-     * time, and that have the same collection id as this index.
+     * time, and that have the same collection ID as this index.
      * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -4841,17 +5323,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getQueryScopeValue() { return queryScope_; } + /** * * *
      * Indexes with a collection query scope specified allow queries
      * against a collection that is the child of a specific document, specified at
-     * query time, and that has the same collection id.
+     * query time, and that has the same collection ID.
      *
      * Indexes with a collection group query scope specified allow queries against
      * all collections descended from a specific document, specified at query
-     * time, and that have the same collection id as this index.
+     * time, and that have the same collection ID as this index.
      * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -4865,17 +5348,18 @@ public Builder setQueryScopeValue(int value) { onChanged(); return this; } + /** * * *
      * Indexes with a collection query scope specified allow queries
      * against a collection that is the child of a specific document, specified at
-     * query time, and that has the same collection id.
+     * query time, and that has the same collection ID.
      *
      * Indexes with a collection group query scope specified allow queries against
      * all collections descended from a specific document, specified at query
-     * time, and that have the same collection id as this index.
+     * time, and that have the same collection ID as this index.
      * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -4888,17 +5372,18 @@ public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { com.google.firestore.admin.v1.Index.QueryScope.forNumber(queryScope_); return result == null ? com.google.firestore.admin.v1.Index.QueryScope.UNRECOGNIZED : result; } + /** * * *
      * Indexes with a collection query scope specified allow queries
      * against a collection that is the child of a specific document, specified at
-     * query time, and that has the same collection id.
+     * query time, and that has the same collection ID.
      *
      * Indexes with a collection group query scope specified allow queries against
      * all collections descended from a specific document, specified at query
-     * time, and that have the same collection id as this index.
+     * time, and that have the same collection ID as this index.
      * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -4915,17 +5400,18 @@ public Builder setQueryScope(com.google.firestore.admin.v1.Index.QueryScope valu onChanged(); return this; } + /** * * *
      * Indexes with a collection query scope specified allow queries
      * against a collection that is the child of a specific document, specified at
-     * query time, and that has the same collection id.
+     * query time, and that has the same collection ID.
      *
      * Indexes with a collection group query scope specified allow queries against
      * all collections descended from a specific document, specified at query
-     * time, and that have the same collection id as this index.
+     * time, and that have the same collection ID as this index.
      * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -4940,6 +5426,7 @@ public Builder clearQueryScope() { } private int apiScope_ = 0; + /** * * @@ -4955,6 +5442,7 @@ public Builder clearQueryScope() { public int getApiScopeValue() { return apiScope_; } + /** * * @@ -4973,6 +5461,7 @@ public Builder setApiScopeValue(int value) { onChanged(); return this; } + /** * * @@ -4990,6 +5479,7 @@ public com.google.firestore.admin.v1.Index.ApiScope getApiScope() { com.google.firestore.admin.v1.Index.ApiScope.forNumber(apiScope_); return result == null ? com.google.firestore.admin.v1.Index.ApiScope.UNRECOGNIZED : result; } + /** * * @@ -5011,6 +5501,7 @@ public Builder setApiScope(com.google.firestore.admin.v1.Index.ApiScope value) { onChanged(); return this; } + /** * * @@ -5071,6 +5562,7 @@ public java.util.List getFieldsL return fieldsBuilder_.getMessageList(); } } + /** * * @@ -5097,6 +5589,7 @@ public int getFieldsCount() { return fieldsBuilder_.getCount(); } } + /** * * @@ -5123,6 +5616,7 @@ public com.google.firestore.admin.v1.Index.IndexField getFields(int index) { return fieldsBuilder_.getMessage(index); } } + /** * * @@ -5155,6 +5649,7 @@ public Builder setFields(int index, com.google.firestore.admin.v1.Index.IndexFie } return this; } + /** * * @@ -5185,6 +5680,7 @@ public Builder setFields( } return this; } + /** * * @@ -5217,6 +5713,7 @@ public Builder addFields(com.google.firestore.admin.v1.Index.IndexField value) { } return this; } + /** * * @@ -5249,6 +5746,7 @@ public Builder addFields(int index, com.google.firestore.admin.v1.Index.IndexFie } return this; } + /** * * @@ -5279,6 +5777,7 @@ public Builder addFields( } return this; } + /** * * @@ -5309,6 +5808,7 @@ public Builder addFields( } return this; } + /** * * @@ -5339,6 +5839,7 @@ public Builder addAllFields( } return this; } + /** * * @@ -5368,6 +5869,7 @@ public Builder clearFields() { } return this; } + /** * * @@ -5397,6 +5899,7 @@ public Builder removeFields(int index) { } return this; } + /** * * @@ -5419,6 +5922,7 @@ public Builder removeFields(int index) { public com.google.firestore.admin.v1.Index.IndexField.Builder getFieldsBuilder(int index) { return getFieldsFieldBuilder().getBuilder(index); } + /** * * @@ -5445,6 +5949,7 @@ public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilde return fieldsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -5472,6 +5977,7 @@ public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilde return java.util.Collections.unmodifiableList(fields_); } } + /** * * @@ -5495,6 +6001,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder() return getFieldsFieldBuilder() .addBuilder(com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance()); } + /** * * @@ -5518,6 +6025,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder(i return getFieldsFieldBuilder() .addBuilder(index, com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance()); } + /** * * @@ -5560,6 +6068,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder(i } private int state_ = 0; + /** * * @@ -5575,6 +6084,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder(i public int getStateValue() { return state_; } + /** * * @@ -5593,6 +6103,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -5610,6 +6121,7 @@ public com.google.firestore.admin.v1.Index.State getState() { com.google.firestore.admin.v1.Index.State.forNumber(state_); return result == null ? com.google.firestore.admin.v1.Index.State.UNRECOGNIZED : result; } + /** * * @@ -5631,6 +6143,7 @@ public Builder setState(com.google.firestore.admin.v1.Index.State value) { onChanged(); return this; } + /** * * @@ -5649,6 +6162,244 @@ public Builder clearState() { return this; } + private int density_ = 0; + + /** + * + * + *
+     * Immutable. The density configuration of the index.
+     * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for density. + */ + @java.lang.Override + public int getDensityValue() { + return density_; + } + + /** + * + * + *
+     * Immutable. The density configuration of the index.
+     * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for density to set. + * @return This builder for chaining. + */ + public Builder setDensityValue(int value) { + density_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The density configuration of the index.
+     * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The density. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Index.Density getDensity() { + com.google.firestore.admin.v1.Index.Density result = + com.google.firestore.admin.v1.Index.Density.forNumber(density_); + return result == null ? com.google.firestore.admin.v1.Index.Density.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Immutable. The density configuration of the index.
+     * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The density to set. + * @return This builder for chaining. + */ + public Builder setDensity(com.google.firestore.admin.v1.Index.Density value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + density_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The density configuration of the index.
+     * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearDensity() { + bitField0_ = (bitField0_ & ~0x00000020); + density_ = 0; + onChanged(); + return this; + } + + private boolean multikey_; + + /** + * + * + *
+     * Optional. Whether the index is multikey. By default, the index is not
+     * multikey. For non-multikey indexes, none of the paths in the index
+     * definition reach or traverse an array, except via an explicit array index.
+     * For multikey indexes, at most one of the paths in the index definition
+     * reach or traverse an array, except via an explicit array index. Violations
+     * will result in errors.
+     *
+     * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.
+     * 
+ * + * bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The multikey. + */ + @java.lang.Override + public boolean getMultikey() { + return multikey_; + } + + /** + * + * + *
+     * Optional. Whether the index is multikey. By default, the index is not
+     * multikey. For non-multikey indexes, none of the paths in the index
+     * definition reach or traverse an array, except via an explicit array index.
+     * For multikey indexes, at most one of the paths in the index definition
+     * reach or traverse an array, except via an explicit array index. Violations
+     * will result in errors.
+     *
+     * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.
+     * 
+ * + * bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The multikey to set. + * @return This builder for chaining. + */ + public Builder setMultikey(boolean value) { + + multikey_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether the index is multikey. By default, the index is not
+     * multikey. For non-multikey indexes, none of the paths in the index
+     * definition reach or traverse an array, except via an explicit array index.
+     * For multikey indexes, at most one of the paths in the index definition
+     * reach or traverse an array, except via an explicit array index. Violations
+     * will result in errors.
+     *
+     * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.
+     * 
+ * + * bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMultikey() { + bitField0_ = (bitField0_ & ~0x00000040); + multikey_ = false; + onChanged(); + return this; + } + + private int shardCount_; + + /** + * + * + *
+     * Optional. The number of shards for the index.
+     * 
+ * + * int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The shardCount. + */ + @java.lang.Override + public int getShardCount() { + return shardCount_; + } + + /** + * + * + *
+     * Optional. The number of shards for the index.
+     * 
+ * + * int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The shardCount to set. + * @return This builder for chaining. + */ + public Builder setShardCount(int value) { + + shardCount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The number of shards for the index.
+     * 
+ * + * int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearShardCount() { + bitField0_ = (bitField0_ & ~0x00000080); + shardCount_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java index efbbc0f38..5abda256a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java index ff822be42..785c3eb54 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -35,6 +35,7 @@ public final class IndexOperationMetadata extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.IndexOperationMetadata) IndexOperationMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use IndexOperationMetadata.newBuilder() to construct. private IndexOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int START_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -84,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +102,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -115,6 +119,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -131,6 +136,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -147,6 +153,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -166,6 +173,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object index_ = ""; + /** * * @@ -190,6 +198,7 @@ public java.lang.String getIndex() { return s; } } + /** * * @@ -217,6 +226,7 @@ public com.google.protobuf.ByteString getIndexBytes() { public static final int STATE_FIELD_NUMBER = 4; private int state_ = 0; + /** * * @@ -232,6 +242,7 @@ public com.google.protobuf.ByteString getIndexBytes() { public int getStateValue() { return state_; } + /** * * @@ -252,6 +263,7 @@ public com.google.firestore.admin.v1.OperationState getState() { public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 5; private com.google.firestore.admin.v1.Progress progressDocuments_; + /** * * @@ -267,6 +279,7 @@ public com.google.firestore.admin.v1.OperationState getState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -284,6 +297,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressDocuments_; } + /** * * @@ -302,6 +316,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public static final int PROGRESS_BYTES_FIELD_NUMBER = 6; private com.google.firestore.admin.v1.Progress progressBytes_; + /** * * @@ -317,6 +332,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -334,6 +350,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressBytes_; } + /** * * @@ -576,6 +593,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -871,6 +889,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -885,6 +904,7 @@ public Builder mergeFrom( public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -903,6 +923,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -925,6 +946,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -944,6 +966,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -971,6 +994,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -990,6 +1014,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1004,6 +1029,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1020,6 +1046,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1052,6 +1079,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1067,6 +1095,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1086,6 +1115,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1109,6 +1139,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1129,6 +1160,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1157,6 +1189,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1177,6 +1210,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1192,6 +1226,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1209,6 +1244,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1237,6 +1273,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private java.lang.Object index_ = ""; + /** * * @@ -1260,6 +1297,7 @@ public java.lang.String getIndex() { return (java.lang.String) ref; } } + /** * * @@ -1283,6 +1321,7 @@ public com.google.protobuf.ByteString getIndexBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1305,6 +1344,7 @@ public Builder setIndex(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1323,6 +1363,7 @@ public Builder clearIndex() { onChanged(); return this; } + /** * * @@ -1348,6 +1389,7 @@ public Builder setIndexBytes(com.google.protobuf.ByteString value) { } private int state_ = 0; + /** * * @@ -1363,6 +1405,7 @@ public Builder setIndexBytes(com.google.protobuf.ByteString value) { public int getStateValue() { return state_; } + /** * * @@ -1381,6 +1424,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -1398,6 +1442,7 @@ public com.google.firestore.admin.v1.OperationState getState() { com.google.firestore.admin.v1.OperationState.forNumber(state_); return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; } + /** * * @@ -1419,6 +1464,7 @@ public Builder setState(com.google.firestore.admin.v1.OperationState value) { onChanged(); return this; } + /** * * @@ -1443,6 +1489,7 @@ public Builder clearState() { com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressDocumentsBuilder_; + /** * * @@ -1457,6 +1504,7 @@ public Builder clearState() { public boolean hasProgressDocuments() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1477,6 +1525,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocumentsBuilder_.getMessage(); } } + /** * * @@ -1499,6 +1548,7 @@ public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value onChanged(); return this; } + /** * * @@ -1519,6 +1569,7 @@ public Builder setProgressDocuments( onChanged(); return this; } + /** * * @@ -1546,6 +1597,7 @@ public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress val } return this; } + /** * * @@ -1565,6 +1617,7 @@ public Builder clearProgressDocuments() { onChanged(); return this; } + /** * * @@ -1579,6 +1632,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilde onChanged(); return getProgressDocumentsFieldBuilder().getBuilder(); } + /** * * @@ -1597,6 +1651,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui : progressDocuments_; } } + /** * * @@ -1629,6 +1684,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressBytesBuilder_; + /** * * @@ -1643,6 +1699,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui public boolean hasProgressBytes() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -1663,6 +1720,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytesBuilder_.getMessage(); } } + /** * * @@ -1685,6 +1743,7 @@ public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { onChanged(); return this; } + /** * * @@ -1705,6 +1764,7 @@ public Builder setProgressBytes( onChanged(); return this; } + /** * * @@ -1732,6 +1792,7 @@ public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) } return this; } + /** * * @@ -1751,6 +1812,7 @@ public Builder clearProgressBytes() { onChanged(); return this; } + /** * * @@ -1765,6 +1827,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() onChanged(); return getProgressBytesFieldBuilder().getBuilder(); } + /** * * @@ -1783,6 +1846,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder : progressBytes_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.java index fa8e3feef..cd33ceb24 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface IndexOperationMetadataOrBuilder @@ -36,6 +36,7 @@ public interface IndexOperationMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -48,6 +49,7 @@ public interface IndexOperationMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -72,6 +74,7 @@ public interface IndexOperationMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -85,6 +88,7 @@ public interface IndexOperationMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -110,6 +114,7 @@ public interface IndexOperationMetadataOrBuilder * @return The index. */ java.lang.String getIndex(); + /** * * @@ -136,6 +141,7 @@ public interface IndexOperationMetadataOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -161,6 +167,7 @@ public interface IndexOperationMetadataOrBuilder * @return Whether the progressDocuments field is set. */ boolean hasProgressDocuments(); + /** * * @@ -173,6 +180,7 @@ public interface IndexOperationMetadataOrBuilder * @return The progressDocuments. */ com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** * * @@ -196,6 +204,7 @@ public interface IndexOperationMetadataOrBuilder * @return Whether the progressBytes field is set. */ boolean hasProgressBytes(); + /** * * @@ -208,6 +217,7 @@ public interface IndexOperationMetadataOrBuilder * @return The progressBytes. */ com.google.firestore.admin.v1.Progress getProgressBytes(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java index 7381d8cc4..0709a0dff 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/index.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface IndexOrBuilder @@ -39,6 +39,7 @@ public interface IndexOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,11 +62,11 @@ public interface IndexOrBuilder *
    * Indexes with a collection query scope specified allow queries
    * against a collection that is the child of a specific document, specified at
-   * query time, and that has the same collection id.
+   * query time, and that has the same collection ID.
    *
    * Indexes with a collection group query scope specified allow queries against
    * all collections descended from a specific document, specified at query
-   * time, and that have the same collection id as this index.
+   * time, and that have the same collection ID as this index.
    * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -73,17 +74,18 @@ public interface IndexOrBuilder * @return The enum numeric value on the wire for queryScope. */ int getQueryScopeValue(); + /** * * *
    * Indexes with a collection query scope specified allow queries
    * against a collection that is the child of a specific document, specified at
-   * query time, and that has the same collection id.
+   * query time, and that has the same collection ID.
    *
    * Indexes with a collection group query scope specified allow queries against
    * all collections descended from a specific document, specified at query
-   * time, and that have the same collection id as this index.
+   * time, and that have the same collection ID as this index.
    * 
* * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; @@ -104,6 +106,7 @@ public interface IndexOrBuilder * @return The enum numeric value on the wire for apiScope. */ int getApiScopeValue(); + /** * * @@ -137,6 +140,7 @@ public interface IndexOrBuilder * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ java.util.List getFieldsList(); + /** * * @@ -157,6 +161,7 @@ public interface IndexOrBuilder * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ com.google.firestore.admin.v1.Index.IndexField getFields(int index); + /** * * @@ -177,6 +182,7 @@ public interface IndexOrBuilder * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ int getFieldsCount(); + /** * * @@ -198,6 +204,7 @@ public interface IndexOrBuilder */ java.util.List getFieldsOrBuilderList(); + /** * * @@ -231,6 +238,7 @@ public interface IndexOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -243,4 +251,67 @@ public interface IndexOrBuilder * @return The state. */ com.google.firestore.admin.v1.Index.State getState(); + + /** + * + * + *
+   * Immutable. The density configuration of the index.
+   * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for density. + */ + int getDensityValue(); + + /** + * + * + *
+   * Immutable. The density configuration of the index.
+   * 
+ * + * + * .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The density. + */ + com.google.firestore.admin.v1.Index.Density getDensity(); + + /** + * + * + *
+   * Optional. Whether the index is multikey. By default, the index is not
+   * multikey. For non-multikey indexes, none of the paths in the index
+   * definition reach or traverse an array, except via an explicit array index.
+   * For multikey indexes, at most one of the paths in the index definition
+   * reach or traverse an array, except via an explicit array index. Violations
+   * will result in errors.
+   *
+   * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.
+   * 
+ * + * bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The multikey. + */ + boolean getMultikey(); + + /** + * + * + *
+   * Optional. The number of shards for the index.
+   * 
+ * + * int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The shardCount. + */ + int getShardCount(); } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java index 9055dc9f9..d7661a148 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/index.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class IndexProto { @@ -56,42 +56,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n%google/firestore/admin/v1/index.proto\022" + "\031google.firestore.admin.v1\032\037google/api/f" + "ield_behavior.proto\032\031google/api/resource" - + ".proto\"\221\t\n\005Index\022\014\n\004name\030\001 \001(\t\022@\n\013query_" + + ".proto\"\355\n\n\005Index\022\014\n\004name\030\001 \001(\t\022@\n\013query_" + "scope\030\002 \001(\0162+.google.firestore.admin.v1." + "Index.QueryScope\022<\n\tapi_scope\030\005 \001(\0162).go" + "ogle.firestore.admin.v1.Index.ApiScope\022;" + "\n\006fields\030\003 \003(\0132+.google.firestore.admin." + "v1.Index.IndexField\0225\n\005state\030\004 \001(\0162&.goo" - + "gle.firestore.admin.v1.Index.State\032\242\004\n\nI" - + "ndexField\022\022\n\nfield_path\030\001 \001(\t\022B\n\005order\030\002" - + " \001(\01621.google.firestore.admin.v1.Index.I" - + "ndexField.OrderH\000\022O\n\014array_config\030\003 \001(\0162" - + "7.google.firestore.admin.v1.Index.IndexF" - + "ield.ArrayConfigH\000\022Q\n\rvector_config\030\004 \001(" - + "\01328.google.firestore.admin.v1.Index.Inde" - + "xField.VectorConfigH\000\032\217\001\n\014VectorConfig\022\026" - + "\n\tdimension\030\001 \001(\005B\003\340A\002\022R\n\004flat\030\002 \001(\0132B.g" - + "oogle.firestore.admin.v1.Index.IndexFiel" - + "d.VectorConfig.FlatIndexH\000\032\013\n\tFlatIndexB" - + "\006\n\004type\"=\n\005Order\022\025\n\021ORDER_UNSPECIFIED\020\000\022" - + "\r\n\tASCENDING\020\001\022\016\n\nDESCENDING\020\002\"9\n\013ArrayC" - + "onfig\022\034\n\030ARRAY_CONFIG_UNSPECIFIED\020\000\022\014\n\010C" - + "ONTAINS\020\001B\014\n\nvalue_mode\"i\n\nQueryScope\022\033\n" - + "\027QUERY_SCOPE_UNSPECIFIED\020\000\022\016\n\nCOLLECTION" - + "\020\001\022\024\n\020COLLECTION_GROUP\020\002\022\030\n\024COLLECTION_R" - + "ECURSIVE\020\003\"/\n\010ApiScope\022\013\n\007ANY_API\020\000\022\026\n\022D" - + "ATASTORE_MODE_API\020\001\"I\n\005State\022\025\n\021STATE_UN" - + "SPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\020\n\014" - + "NEEDS_REPAIR\020\003:z\352Aw\n\036firestore.googleapi" - + "s.com/Index\022Uprojects/{project}/database" - + "s/{database}/collectionGroups/{collectio" - + "n}/indexes/{index}B\331\001\n\035com.google.firest" - + "ore.admin.v1B\nIndexProtoP\001Z9cloud.google" - + ".com/go/firestore/apiv1/admin/adminpb;ad" - + "minpb\242\002\004GCFS\252\002\037Google.Cloud.Firestore.Ad" - + "min.V1\312\002\037Google\\Cloud\\Firestore\\Admin\\V1" - + "\352\002#Google::Cloud::Firestore::Admin::V1b\006" - + "proto3" + + "gle.firestore.admin.v1.Index.State\022>\n\007de" + + "nsity\030\006 \001(\0162(.google.firestore.admin.v1." + + "Index.DensityB\003\340A\005\022\025\n\010multikey\030\007 \001(\010B\003\340A" + + "\001\022\030\n\013shard_count\030\010 \001(\005B\003\340A\001\032\242\004\n\nIndexFie" + + "ld\022\022\n\nfield_path\030\001 \001(\t\022B\n\005order\030\002 \001(\01621." + + "google.firestore.admin.v1.Index.IndexFie" + + "ld.OrderH\000\022O\n\014array_config\030\003 \001(\01627.googl" + + "e.firestore.admin.v1.Index.IndexField.Ar" + + "rayConfigH\000\022Q\n\rvector_config\030\004 \001(\01328.goo" + + "gle.firestore.admin.v1.Index.IndexField." + + "VectorConfigH\000\032\217\001\n\014VectorConfig\022\026\n\tdimen" + + "sion\030\001 \001(\005B\003\340A\002\022R\n\004flat\030\002 \001(\0132B.google.f" + + "irestore.admin.v1.Index.IndexField.Vecto" + + "rConfig.FlatIndexH\000\032\013\n\tFlatIndexB\006\n\004type" + + "\"=\n\005Order\022\025\n\021ORDER_UNSPECIFIED\020\000\022\r\n\tASCE" + + "NDING\020\001\022\016\n\nDESCENDING\020\002\"9\n\013ArrayConfig\022\034" + + "\n\030ARRAY_CONFIG_UNSPECIFIED\020\000\022\014\n\010CONTAINS" + + "\020\001B\014\n\nvalue_mode\"i\n\nQueryScope\022\033\n\027QUERY_" + + "SCOPE_UNSPECIFIED\020\000\022\016\n\nCOLLECTION\020\001\022\024\n\020C" + + "OLLECTION_GROUP\020\002\022\030\n\024COLLECTION_RECURSIV" + + "E\020\003\"K\n\010ApiScope\022\013\n\007ANY_API\020\000\022\026\n\022DATASTOR" + + "E_MODE_API\020\001\022\032\n\026MONGODB_COMPATIBLE_API\020\002" + + "\"I\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREA" + + "TING\020\001\022\t\n\005READY\020\002\022\020\n\014NEEDS_REPAIR\020\003\"M\n\007D" + + "ensity\022\027\n\023DENSITY_UNSPECIFIED\020\000\022\016\n\nSPARS" + + "E_ALL\020\001\022\016\n\nSPARSE_ANY\020\002\022\t\n\005DENSE\020\003:z\352Aw\n" + + "\036firestore.googleapis.com/Index\022Uproject" + + "s/{project}/databases/{database}/collect" + + "ionGroups/{collection}/indexes/{index}B\331" + + "\001\n\035com.google.firestore.admin.v1B\nIndexP" + + "rotoP\001Z9cloud.google.com/go/firestore/ap" + + "iv1/admin/adminpb;adminpb\242\002\004GCFS\252\002\037Googl" + + "e.Cloud.Firestore.Admin.V1\312\002\037Google\\Clou" + + "d\\Firestore\\Admin\\V1\352\002#Google::Cloud::Fi" + + "restore::Admin::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -106,7 +111,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_Index_descriptor, new java.lang.String[] { - "Name", "QueryScope", "ApiScope", "Fields", "State", + "Name", + "QueryScope", + "ApiScope", + "Fields", + "State", + "Density", + "Multikey", + "ShardCount", }); internal_static_google_firestore_admin_v1_Index_IndexField_descriptor = internal_static_google_firestore_admin_v1_Index_descriptor.getNestedTypes().get(0); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequest.java index 441f55ac8..1c4d072f2 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListBackupSchedulesRequest extends com.google.protobuf.Genera // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListBackupSchedulesRequest) ListBackupSchedulesRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListBackupSchedulesRequest.newBuilder() to construct. private ListBackupSchedulesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -283,6 +286,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -468,6 +472,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -494,6 +499,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -520,6 +526,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -545,6 +552,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -566,6 +574,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequestOrBuilder.java index 2c4bba0b5..e53fe018a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListBackupSchedulesRequestOrBuilder @@ -40,6 +40,7 @@ public interface ListBackupSchedulesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponse.java index 07fbfebda..22a051ebd 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListBackupSchedulesResponse extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListBackupSchedulesResponse) ListBackupSchedulesResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListBackupSchedulesResponse.newBuilder() to construct. private ListBackupSchedulesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List backupSchedules_; + /** * * @@ -81,6 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getBackupSchedulesList() { return backupSchedules_; } + /** * * @@ -95,6 +98,7 @@ public java.util.List getBackupSch getBackupSchedulesOrBuilderList() { return backupSchedules_; } + /** * * @@ -108,6 +112,7 @@ public java.util.List getBackupSch public int getBackupSchedulesCount() { return backupSchedules_.size(); } + /** * * @@ -121,6 +126,7 @@ public int getBackupSchedulesCount() { public com.google.firestore.admin.v1.BackupSchedule getBackupSchedules(int index) { return backupSchedules_.get(index); } + /** * * @@ -298,6 +304,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -561,6 +568,7 @@ public java.util.List getBackupSch return backupSchedulesBuilder_.getMessageList(); } } + /** * * @@ -577,6 +585,7 @@ public int getBackupSchedulesCount() { return backupSchedulesBuilder_.getCount(); } } + /** * * @@ -593,6 +602,7 @@ public com.google.firestore.admin.v1.BackupSchedule getBackupSchedules(int index return backupSchedulesBuilder_.getMessage(index); } } + /** * * @@ -616,6 +626,7 @@ public Builder setBackupSchedules( } return this; } + /** * * @@ -636,6 +647,7 @@ public Builder setBackupSchedules( } return this; } + /** * * @@ -658,6 +670,7 @@ public Builder addBackupSchedules(com.google.firestore.admin.v1.BackupSchedule v } return this; } + /** * * @@ -681,6 +694,7 @@ public Builder addBackupSchedules( } return this; } + /** * * @@ -701,6 +715,7 @@ public Builder addBackupSchedules( } return this; } + /** * * @@ -721,6 +736,7 @@ public Builder addBackupSchedules( } return this; } + /** * * @@ -741,6 +757,7 @@ public Builder addAllBackupSchedules( } return this; } + /** * * @@ -760,6 +777,7 @@ public Builder clearBackupSchedules() { } return this; } + /** * * @@ -779,6 +797,7 @@ public Builder removeBackupSchedules(int index) { } return this; } + /** * * @@ -792,6 +811,7 @@ public com.google.firestore.admin.v1.BackupSchedule.Builder getBackupSchedulesBu int index) { return getBackupSchedulesFieldBuilder().getBuilder(index); } + /** * * @@ -809,6 +829,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupSchedulesO return backupSchedulesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -826,6 +847,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupSchedulesO return java.util.Collections.unmodifiableList(backupSchedules_); } } + /** * * @@ -839,6 +861,7 @@ public com.google.firestore.admin.v1.BackupSchedule.Builder addBackupSchedulesBu return getBackupSchedulesFieldBuilder() .addBuilder(com.google.firestore.admin.v1.BackupSchedule.getDefaultInstance()); } + /** * * @@ -853,6 +876,7 @@ public com.google.firestore.admin.v1.BackupSchedule.Builder addBackupSchedulesBu return getBackupSchedulesFieldBuilder() .addBuilder(index, com.google.firestore.admin.v1.BackupSchedule.getDefaultInstance()); } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponseOrBuilder.java index b2b4cc77c..526b368a6 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupSchedulesResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListBackupSchedulesResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListBackupSchedulesResponseOrBuilder * repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; */ java.util.List getBackupSchedulesList(); + /** * * @@ -44,6 +45,7 @@ public interface ListBackupSchedulesResponseOrBuilder * repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; */ com.google.firestore.admin.v1.BackupSchedule getBackupSchedules(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListBackupSchedulesResponseOrBuilder * repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; */ int getBackupSchedulesCount(); + /** * * @@ -65,6 +68,7 @@ public interface ListBackupSchedulesResponseOrBuilder */ java.util.List getBackupSchedulesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequest.java index fd2bc58c4..972304fd4 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListBackupsRequest) ListBackupsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListBackupsRequest.newBuilder() to construct. private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -41,6 +42,7 @@ private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder bui private ListBackupsRequest() { parent_ = ""; + filter_ = ""; } @java.lang.Override @@ -68,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -98,6 +101,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -129,6 +133,81 @@ public com.google.protobuf.ByteString getParentBytes() { } } + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * An expression that filters the list of returned backups.
+   *
+   * A filter expression consists of a field name, a comparison operator, and a
+   * value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+   * eligible for filtering:
+   *
+   *   * `database_uid` (supports `=` only)
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * An expression that filters the list of returned backups.
+   *
+   * A filter expression consists of a field name, a comparison operator, and a
+   * value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+   * eligible for filtering:
+   *
+   *   * `database_uid` (supports `=` only)
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -146,6 +225,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } getUnknownFields().writeTo(output); } @@ -158,6 +240,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -175,6 +260,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.firestore.admin.v1.ListBackupsRequest) obj; if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -188,6 +274,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -288,6 +376,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -329,6 +418,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; parent_ = ""; + filter_ = ""; return this; } @@ -368,6 +458,9 @@ private void buildPartial0(com.google.firestore.admin.v1.ListBackupsRequest resu if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } } @java.lang.Override @@ -421,6 +514,11 @@ public Builder mergeFrom(com.google.firestore.admin.v1.ListBackupsRequest other) bitField0_ |= 0x00000001; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -453,6 +551,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -473,6 +577,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -502,6 +607,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -531,6 +637,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -559,6 +666,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -583,6 +691,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -613,6 +722,172 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * An expression that filters the list of returned backups.
+     *
+     * A filter expression consists of a field name, a comparison operator, and a
+     * value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+     * eligible for filtering:
+     *
+     *   * `database_uid` (supports `=` only)
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An expression that filters the list of returned backups.
+     *
+     * A filter expression consists of a field name, a comparison operator, and a
+     * value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+     * eligible for filtering:
+     *
+     *   * `database_uid` (supports `=` only)
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An expression that filters the list of returned backups.
+     *
+     * A filter expression consists of a field name, a comparison operator, and a
+     * value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+     * eligible for filtering:
+     *
+     *   * `database_uid` (supports `=` only)
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of returned backups.
+     *
+     * A filter expression consists of a field name, a comparison operator, and a
+     * value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+     * eligible for filtering:
+     *
+     *   * `database_uid` (supports `=` only)
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of returned backups.
+     *
+     * A filter expression consists of a field name, a comparison operator, and a
+     * value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+     * eligible for filtering:
+     *
+     *   * `database_uid` (supports `=` only)
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequestOrBuilder.java index ab2541756..32db3a45a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListBackupsRequestOrBuilder @@ -43,6 +43,7 @@ public interface ListBackupsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -62,4 +63,52 @@ public interface ListBackupsRequestOrBuilder * @return The bytes for parent. */ com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * An expression that filters the list of returned backups.
+   *
+   * A filter expression consists of a field name, a comparison operator, and a
+   * value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+   * eligible for filtering:
+   *
+   *   * `database_uid` (supports `=` only)
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of returned backups.
+   *
+   * A filter expression consists of a field name, a comparison operator, and a
+   * value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Backup][google.firestore.admin.v1.Backup] are
+   * eligible for filtering:
+   *
+   *   * `database_uid` (supports `=` only)
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponse.java index 444e6d34d..cb7855f66 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListBackupsResponse extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListBackupsResponse) ListBackupsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListBackupsResponse.newBuilder() to construct. private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List backups_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getBackupsList() { return backups_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getBackupsList() { getBackupsOrBuilderList() { return backups_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getBackupsList() { public int getBackupsCount() { return backups_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getBackupsCount() { public com.google.firestore.admin.v1.Backup getBackups(int index) { return backups_.get(index); } + /** * * @@ -141,6 +147,7 @@ public com.google.firestore.admin.v1.BackupOrBuilder getBackupsOrBuilder(int ind @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -160,6 +167,7 @@ public com.google.firestore.admin.v1.BackupOrBuilder getBackupsOrBuilder(int ind public com.google.protobuf.ProtocolStringList getUnreachableList() { return unreachable_; } + /** * * @@ -179,6 +187,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { public int getUnreachableCount() { return unreachable_.size(); } + /** * * @@ -199,6 +208,7 @@ public int getUnreachableCount() { public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } + /** * * @@ -397,6 +407,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -681,6 +692,7 @@ public java.util.List getBackupsList() { return backupsBuilder_.getMessageList(); } } + /** * * @@ -697,6 +709,7 @@ public int getBackupsCount() { return backupsBuilder_.getCount(); } } + /** * * @@ -713,6 +726,7 @@ public com.google.firestore.admin.v1.Backup getBackups(int index) { return backupsBuilder_.getMessage(index); } } + /** * * @@ -735,6 +749,7 @@ public Builder setBackups(int index, com.google.firestore.admin.v1.Backup value) } return this; } + /** * * @@ -755,6 +770,7 @@ public Builder setBackups( } return this; } + /** * * @@ -777,6 +793,7 @@ public Builder addBackups(com.google.firestore.admin.v1.Backup value) { } return this; } + /** * * @@ -799,6 +816,7 @@ public Builder addBackups(int index, com.google.firestore.admin.v1.Backup value) } return this; } + /** * * @@ -818,6 +836,7 @@ public Builder addBackups(com.google.firestore.admin.v1.Backup.Builder builderFo } return this; } + /** * * @@ -838,6 +857,7 @@ public Builder addBackups( } return this; } + /** * * @@ -858,6 +878,7 @@ public Builder addAllBackups( } return this; } + /** * * @@ -877,6 +898,7 @@ public Builder clearBackups() { } return this; } + /** * * @@ -896,6 +918,7 @@ public Builder removeBackups(int index) { } return this; } + /** * * @@ -908,6 +931,7 @@ public Builder removeBackups(int index) { public com.google.firestore.admin.v1.Backup.Builder getBackupsBuilder(int index) { return getBackupsFieldBuilder().getBuilder(index); } + /** * * @@ -924,6 +948,7 @@ public com.google.firestore.admin.v1.BackupOrBuilder getBackupsOrBuilder(int ind return backupsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -941,6 +966,7 @@ public com.google.firestore.admin.v1.BackupOrBuilder getBackupsOrBuilder(int ind return java.util.Collections.unmodifiableList(backups_); } } + /** * * @@ -954,6 +980,7 @@ public com.google.firestore.admin.v1.Backup.Builder addBackupsBuilder() { return getBackupsFieldBuilder() .addBuilder(com.google.firestore.admin.v1.Backup.getDefaultInstance()); } + /** * * @@ -967,6 +994,7 @@ public com.google.firestore.admin.v1.Backup.Builder addBackupsBuilder(int index) return getBackupsFieldBuilder() .addBuilder(index, com.google.firestore.admin.v1.Backup.getDefaultInstance()); } + /** * * @@ -1006,6 +1034,7 @@ private void ensureUnreachableIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1026,6 +1055,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { unreachable_.makeImmutable(); return unreachable_; } + /** * * @@ -1045,6 +1075,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { public int getUnreachableCount() { return unreachable_.size(); } + /** * * @@ -1065,6 +1096,7 @@ public int getUnreachableCount() { public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } + /** * * @@ -1085,6 +1117,7 @@ public java.lang.String getUnreachable(int index) { public com.google.protobuf.ByteString getUnreachableBytes(int index) { return unreachable_.getByteString(index); } + /** * * @@ -1113,6 +1146,7 @@ public Builder setUnreachable(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1140,6 +1174,7 @@ public Builder addUnreachable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1164,6 +1199,7 @@ public Builder addAllUnreachable(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -1187,6 +1223,7 @@ public Builder clearUnreachable() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponseOrBuilder.java index 6d36e5016..25af83140 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListBackupsResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListBackupsResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.firestore.admin.v1.Backup backups = 1; */ java.util.List getBackupsList(); + /** * * @@ -44,6 +45,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.firestore.admin.v1.Backup backups = 1; */ com.google.firestore.admin.v1.Backup getBackups(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.firestore.admin.v1.Backup backups = 1; */ int getBackupsCount(); + /** * * @@ -64,6 +67,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.firestore.admin.v1.Backup backups = 1; */ java.util.List getBackupsOrBuilderList(); + /** * * @@ -92,6 +96,7 @@ public interface ListBackupsResponseOrBuilder * @return A list containing the unreachable. */ java.util.List getUnreachableList(); + /** * * @@ -109,6 +114,7 @@ public interface ListBackupsResponseOrBuilder * @return The count of unreachable. */ int getUnreachableCount(); + /** * * @@ -127,6 +133,7 @@ public interface ListBackupsResponseOrBuilder * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.java index 40f129713..184019a97 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -33,6 +33,7 @@ public final class ListDatabasesRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListDatabasesRequest) ListDatabasesRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListDatabasesRequest.newBuilder() to construct. private ListDatabasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -122,6 +125,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int SHOW_DELETED_FIELD_NUMBER = 4; private boolean showDeleted_ = false; + /** * * @@ -306,6 +310,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -503,6 +508,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -528,6 +534,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -553,6 +560,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -577,6 +585,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -597,6 +606,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -624,6 +634,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private boolean showDeleted_; + /** * * @@ -639,6 +650,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean getShowDeleted() { return showDeleted_; } + /** * * @@ -658,6 +670,7 @@ public Builder setShowDeleted(boolean value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.java index 219346e4f..eea14a780 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListDatabasesRequestOrBuilder @@ -39,6 +39,7 @@ public interface ListDatabasesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponse.java index 71a0bfcf5..91454705b 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -33,6 +33,7 @@ public final class ListDatabasesResponse extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListDatabasesResponse) ListDatabasesResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListDatabasesResponse.newBuilder() to construct. private ListDatabasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List databases_; + /** * * @@ -81,6 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getDatabasesList() { return databases_; } + /** * * @@ -95,6 +98,7 @@ public java.util.List getDatabasesList() getDatabasesOrBuilderList() { return databases_; } + /** * * @@ -108,6 +112,7 @@ public java.util.List getDatabasesList() public int getDatabasesCount() { return databases_.size(); } + /** * * @@ -121,6 +126,7 @@ public int getDatabasesCount() { public com.google.firestore.admin.v1.Database getDatabases(int index) { return databases_.get(index); } + /** * * @@ -140,6 +146,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabasesOrBuilder(int @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -162,6 +169,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabasesOrBuilder(int public com.google.protobuf.ProtocolStringList getUnreachableList() { return unreachable_; } + /** * * @@ -184,6 +192,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { public int getUnreachableCount() { return unreachable_.size(); } + /** * * @@ -207,6 +216,7 @@ public int getUnreachableCount() { public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } + /** * * @@ -408,6 +418,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -691,6 +702,7 @@ public java.util.List getDatabasesList() return databasesBuilder_.getMessageList(); } } + /** * * @@ -707,6 +719,7 @@ public int getDatabasesCount() { return databasesBuilder_.getCount(); } } + /** * * @@ -723,6 +736,7 @@ public com.google.firestore.admin.v1.Database getDatabases(int index) { return databasesBuilder_.getMessage(index); } } + /** * * @@ -745,6 +759,7 @@ public Builder setDatabases(int index, com.google.firestore.admin.v1.Database va } return this; } + /** * * @@ -765,6 +780,7 @@ public Builder setDatabases( } return this; } + /** * * @@ -787,6 +803,7 @@ public Builder addDatabases(com.google.firestore.admin.v1.Database value) { } return this; } + /** * * @@ -809,6 +826,7 @@ public Builder addDatabases(int index, com.google.firestore.admin.v1.Database va } return this; } + /** * * @@ -828,6 +846,7 @@ public Builder addDatabases(com.google.firestore.admin.v1.Database.Builder build } return this; } + /** * * @@ -848,6 +867,7 @@ public Builder addDatabases( } return this; } + /** * * @@ -868,6 +888,7 @@ public Builder addAllDatabases( } return this; } + /** * * @@ -887,6 +908,7 @@ public Builder clearDatabases() { } return this; } + /** * * @@ -906,6 +928,7 @@ public Builder removeDatabases(int index) { } return this; } + /** * * @@ -918,6 +941,7 @@ public Builder removeDatabases(int index) { public com.google.firestore.admin.v1.Database.Builder getDatabasesBuilder(int index) { return getDatabasesFieldBuilder().getBuilder(index); } + /** * * @@ -934,6 +958,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabasesOrBuilder(int return databasesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -951,6 +976,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabasesOrBuilder(int return java.util.Collections.unmodifiableList(databases_); } } + /** * * @@ -964,6 +990,7 @@ public com.google.firestore.admin.v1.Database.Builder addDatabasesBuilder() { return getDatabasesFieldBuilder() .addBuilder(com.google.firestore.admin.v1.Database.getDefaultInstance()); } + /** * * @@ -977,6 +1004,7 @@ public com.google.firestore.admin.v1.Database.Builder addDatabasesBuilder(int in return getDatabasesFieldBuilder() .addBuilder(index, com.google.firestore.admin.v1.Database.getDefaultInstance()); } + /** * * @@ -1017,6 +1045,7 @@ private void ensureUnreachableIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1040,6 +1069,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { unreachable_.makeImmutable(); return unreachable_; } + /** * * @@ -1062,6 +1092,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { public int getUnreachableCount() { return unreachable_.size(); } + /** * * @@ -1085,6 +1116,7 @@ public int getUnreachableCount() { public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } + /** * * @@ -1108,6 +1140,7 @@ public java.lang.String getUnreachable(int index) { public com.google.protobuf.ByteString getUnreachableBytes(int index) { return unreachable_.getByteString(index); } + /** * * @@ -1139,6 +1172,7 @@ public Builder setUnreachable(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1169,6 +1203,7 @@ public Builder addUnreachable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1196,6 +1231,7 @@ public Builder addAllUnreachable(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -1222,6 +1258,7 @@ public Builder clearUnreachable() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponseOrBuilder.java index e20bbfcb0..c0361de30 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListDatabasesResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListDatabasesResponseOrBuilder * repeated .google.firestore.admin.v1.Database databases = 1; */ java.util.List getDatabasesList(); + /** * * @@ -44,6 +45,7 @@ public interface ListDatabasesResponseOrBuilder * repeated .google.firestore.admin.v1.Database databases = 1; */ com.google.firestore.admin.v1.Database getDatabases(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListDatabasesResponseOrBuilder * repeated .google.firestore.admin.v1.Database databases = 1; */ int getDatabasesCount(); + /** * * @@ -65,6 +68,7 @@ public interface ListDatabasesResponseOrBuilder */ java.util.List getDatabasesOrBuilderList(); + /** * * @@ -96,6 +100,7 @@ public interface ListDatabasesResponseOrBuilder * @return A list containing the unreachable. */ java.util.List getUnreachableList(); + /** * * @@ -116,6 +121,7 @@ public interface ListDatabasesResponseOrBuilder * @return The count of unreachable. */ int getUnreachableCount(); + /** * * @@ -137,6 +143,7 @@ public interface ListDatabasesResponseOrBuilder * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java index 8fc78de07..0a0eb6dca 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListFieldsRequest extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListFieldsRequest) ListFieldsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListFieldsRequest.newBuilder() to construct. private ListFieldsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -127,6 +130,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object filter_ = ""; + /** * * @@ -156,6 +160,7 @@ public java.lang.String getFilter() { return s; } } + /** * * @@ -188,6 +193,7 @@ public com.google.protobuf.ByteString getFilterBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 3; private int pageSize_ = 0; + /** * * @@ -208,6 +214,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -233,6 +240,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -445,6 +453,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -673,6 +682,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -698,6 +708,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -723,6 +734,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -747,6 +759,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -767,6 +780,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -794,6 +808,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object filter_ = ""; + /** * * @@ -822,6 +837,7 @@ public java.lang.String getFilter() { return (java.lang.String) ref; } } + /** * * @@ -850,6 +866,7 @@ public com.google.protobuf.ByteString getFilterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -877,6 +894,7 @@ public Builder setFilter(java.lang.String value) { onChanged(); return this; } + /** * * @@ -900,6 +918,7 @@ public Builder clearFilter() { onChanged(); return this; } + /** * * @@ -930,6 +949,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -945,6 +965,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -964,6 +985,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -983,6 +1005,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -1007,6 +1030,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1031,6 +1055,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1054,6 +1079,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1073,6 +1099,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java index 091d594c7..de1df2f6d 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListFieldsRequestOrBuilder @@ -39,6 +39,7 @@ public interface ListFieldsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -73,6 +74,7 @@ public interface ListFieldsRequestOrBuilder * @return The filter. */ java.lang.String getFilter(); + /** * * @@ -119,6 +121,7 @@ public interface ListFieldsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java index b055c2723..111fb93c8 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListFieldsResponse extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListFieldsResponse) ListFieldsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListFieldsResponse.newBuilder() to construct. private ListFieldsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List fields_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getFieldsList() { return fields_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getFieldsList() { getFieldsOrBuilderList() { return fields_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getFieldsList() { public int getFieldsCount() { return fields_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getFieldsCount() { public com.google.firestore.admin.v1.Field getFields(int index) { return fields_.get(index); } + /** * * @@ -140,6 +146,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -164,6 +171,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -359,6 +367,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -636,6 +645,7 @@ public java.util.List getFieldsList() { return fieldsBuilder_.getMessageList(); } } + /** * * @@ -652,6 +662,7 @@ public int getFieldsCount() { return fieldsBuilder_.getCount(); } } + /** * * @@ -668,6 +679,7 @@ public com.google.firestore.admin.v1.Field getFields(int index) { return fieldsBuilder_.getMessage(index); } } + /** * * @@ -690,6 +702,7 @@ public Builder setFields(int index, com.google.firestore.admin.v1.Field value) { } return this; } + /** * * @@ -710,6 +723,7 @@ public Builder setFields( } return this; } + /** * * @@ -732,6 +746,7 @@ public Builder addFields(com.google.firestore.admin.v1.Field value) { } return this; } + /** * * @@ -754,6 +769,7 @@ public Builder addFields(int index, com.google.firestore.admin.v1.Field value) { } return this; } + /** * * @@ -773,6 +789,7 @@ public Builder addFields(com.google.firestore.admin.v1.Field.Builder builderForV } return this; } + /** * * @@ -793,6 +810,7 @@ public Builder addFields( } return this; } + /** * * @@ -813,6 +831,7 @@ public Builder addAllFields( } return this; } + /** * * @@ -832,6 +851,7 @@ public Builder clearFields() { } return this; } + /** * * @@ -851,6 +871,7 @@ public Builder removeFields(int index) { } return this; } + /** * * @@ -863,6 +884,7 @@ public Builder removeFields(int index) { public com.google.firestore.admin.v1.Field.Builder getFieldsBuilder(int index) { return getFieldsFieldBuilder().getBuilder(index); } + /** * * @@ -879,6 +901,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index return fieldsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -896,6 +919,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index return java.util.Collections.unmodifiableList(fields_); } } + /** * * @@ -909,6 +933,7 @@ public com.google.firestore.admin.v1.Field.Builder addFieldsBuilder() { return getFieldsFieldBuilder() .addBuilder(com.google.firestore.admin.v1.Field.getDefaultInstance()); } + /** * * @@ -922,6 +947,7 @@ public com.google.firestore.admin.v1.Field.Builder addFieldsBuilder(int index) { return getFieldsFieldBuilder() .addBuilder(index, com.google.firestore.admin.v1.Field.getDefaultInstance()); } + /** * * @@ -953,6 +979,7 @@ public java.util.List getFieldsBuil } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -976,6 +1003,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -999,6 +1027,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1021,6 +1050,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1039,6 +1069,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.java index 519c7e670..9bd873ce7 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListFieldsResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListFieldsResponseOrBuilder * repeated .google.firestore.admin.v1.Field fields = 1; */ java.util.List getFieldsList(); + /** * * @@ -44,6 +45,7 @@ public interface ListFieldsResponseOrBuilder * repeated .google.firestore.admin.v1.Field fields = 1; */ com.google.firestore.admin.v1.Field getFields(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListFieldsResponseOrBuilder * repeated .google.firestore.admin.v1.Field fields = 1; */ int getFieldsCount(); + /** * * @@ -64,6 +67,7 @@ public interface ListFieldsResponseOrBuilder * repeated .google.firestore.admin.v1.Field fields = 1; */ java.util.List getFieldsOrBuilderList(); + /** * * @@ -88,6 +92,7 @@ public interface ListFieldsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java index 91f68dbc4..fb254a273 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListIndexesRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListIndexesRequest) ListIndexesRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListIndexesRequest.newBuilder() to construct. private ListIndexesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -127,6 +130,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object filter_ = ""; + /** * * @@ -150,6 +154,7 @@ public java.lang.String getFilter() { return s; } } + /** * * @@ -176,6 +181,7 @@ public com.google.protobuf.ByteString getFilterBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 3; private int pageSize_ = 0; + /** * * @@ -196,6 +202,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -221,6 +228,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -433,6 +441,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -661,6 +670,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -686,6 +696,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -711,6 +722,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -735,6 +747,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -755,6 +768,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -782,6 +796,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object filter_ = ""; + /** * * @@ -804,6 +819,7 @@ public java.lang.String getFilter() { return (java.lang.String) ref; } } + /** * * @@ -826,6 +842,7 @@ public com.google.protobuf.ByteString getFilterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -847,6 +864,7 @@ public Builder setFilter(java.lang.String value) { onChanged(); return this; } + /** * * @@ -864,6 +882,7 @@ public Builder clearFilter() { onChanged(); return this; } + /** * * @@ -888,6 +907,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -903,6 +923,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -922,6 +943,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -941,6 +963,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -965,6 +988,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -989,6 +1013,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1012,6 +1037,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1031,6 +1057,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.java index e7979f7fc..fcd1d039f 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListIndexesRequestOrBuilder @@ -39,6 +39,7 @@ public interface ListIndexesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -67,6 +68,7 @@ public interface ListIndexesRequestOrBuilder * @return The filter. */ java.lang.String getFilter(); + /** * * @@ -107,6 +109,7 @@ public interface ListIndexesRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java index ccda24a76..66ad790c0 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class ListIndexesResponse extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListIndexesResponse) ListIndexesResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListIndexesResponse.newBuilder() to construct. private ListIndexesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List indexes_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getIndexesList() { return indexes_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getIndexesList() { getIndexesOrBuilderList() { return indexes_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getIndexesList() { public int getIndexesCount() { return indexes_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getIndexesCount() { public com.google.firestore.admin.v1.Index getIndexes(int index) { return indexes_.get(index); } + /** * * @@ -140,6 +146,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -164,6 +171,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -359,6 +367,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -636,6 +645,7 @@ public java.util.List getIndexesList() { return indexesBuilder_.getMessageList(); } } + /** * * @@ -652,6 +662,7 @@ public int getIndexesCount() { return indexesBuilder_.getCount(); } } + /** * * @@ -668,6 +679,7 @@ public com.google.firestore.admin.v1.Index getIndexes(int index) { return indexesBuilder_.getMessage(index); } } + /** * * @@ -690,6 +702,7 @@ public Builder setIndexes(int index, com.google.firestore.admin.v1.Index value) } return this; } + /** * * @@ -710,6 +723,7 @@ public Builder setIndexes( } return this; } + /** * * @@ -732,6 +746,7 @@ public Builder addIndexes(com.google.firestore.admin.v1.Index value) { } return this; } + /** * * @@ -754,6 +769,7 @@ public Builder addIndexes(int index, com.google.firestore.admin.v1.Index value) } return this; } + /** * * @@ -773,6 +789,7 @@ public Builder addIndexes(com.google.firestore.admin.v1.Index.Builder builderFor } return this; } + /** * * @@ -793,6 +810,7 @@ public Builder addIndexes( } return this; } + /** * * @@ -813,6 +831,7 @@ public Builder addAllIndexes( } return this; } + /** * * @@ -832,6 +851,7 @@ public Builder clearIndexes() { } return this; } + /** * * @@ -851,6 +871,7 @@ public Builder removeIndexes(int index) { } return this; } + /** * * @@ -863,6 +884,7 @@ public Builder removeIndexes(int index) { public com.google.firestore.admin.v1.Index.Builder getIndexesBuilder(int index) { return getIndexesFieldBuilder().getBuilder(index); } + /** * * @@ -879,6 +901,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde return indexesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -896,6 +919,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde return java.util.Collections.unmodifiableList(indexes_); } } + /** * * @@ -909,6 +933,7 @@ public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder() { return getIndexesFieldBuilder() .addBuilder(com.google.firestore.admin.v1.Index.getDefaultInstance()); } + /** * * @@ -922,6 +947,7 @@ public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder(int index) return getIndexesFieldBuilder() .addBuilder(index, com.google.firestore.admin.v1.Index.getDefaultInstance()); } + /** * * @@ -953,6 +979,7 @@ public java.util.List getIndexesBui } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -976,6 +1003,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -999,6 +1027,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1021,6 +1050,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1039,6 +1069,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.java index f42aeae73..36219edc5 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ListIndexesResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListIndexesResponseOrBuilder * repeated .google.firestore.admin.v1.Index indexes = 1; */ java.util.List getIndexesList(); + /** * * @@ -44,6 +45,7 @@ public interface ListIndexesResponseOrBuilder * repeated .google.firestore.admin.v1.Index indexes = 1; */ com.google.firestore.admin.v1.Index getIndexes(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListIndexesResponseOrBuilder * repeated .google.firestore.admin.v1.Index indexes = 1; */ int getIndexesCount(); + /** * * @@ -64,6 +67,7 @@ public interface ListIndexesResponseOrBuilder * repeated .google.firestore.admin.v1.Index indexes = 1; */ java.util.List getIndexesOrBuilderList(); + /** * * @@ -88,6 +92,7 @@ public interface ListIndexesResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsRequest.java new file mode 100644 index 000000000..c4510cee1 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.ListUserCreds][google.firestore.admin.v1.FirestoreAdmin.ListUserCreds].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListUserCredsRequest} + */ +public final class ListUserCredsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListUserCredsRequest) + ListUserCredsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListUserCredsRequest.newBuilder() to construct. + private ListUserCredsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListUserCredsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListUserCredsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListUserCredsRequest.class, + com.google.firestore.admin.v1.ListUserCredsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. A parent database name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A parent database name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.ListUserCredsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ListUserCredsRequest other = + (com.google.firestore.admin.v1.ListUserCredsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.ListUserCredsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [FirestoreAdmin.ListUserCreds][google.firestore.admin.v1.FirestoreAdmin.ListUserCreds].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListUserCredsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ListUserCredsRequest) + com.google.firestore.admin.v1.ListUserCredsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListUserCredsRequest.class, + com.google.firestore.admin.v1.ListUserCredsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ListUserCredsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ListUserCredsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsRequest build() { + com.google.firestore.admin.v1.ListUserCredsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsRequest buildPartial() { + com.google.firestore.admin.v1.ListUserCredsRequest result = + new com.google.firestore.admin.v1.ListUserCredsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.ListUserCredsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ListUserCredsRequest) { + return mergeFrom((com.google.firestore.admin.v1.ListUserCredsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ListUserCredsRequest other) { + if (other == com.google.firestore.admin.v1.ListUserCredsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. A parent database name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A parent database name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A parent database name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A parent database name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A parent database name of the form
+     * `projects/{project_id}/databases/{database_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.ListUserCredsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ListUserCredsRequest) + private static final com.google.firestore.admin.v1.ListUserCredsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ListUserCredsRequest(); + } + + public static com.google.firestore.admin.v1.ListUserCredsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserCredsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsRequestOrBuilder.java new file mode 100644 index 000000000..0feaa75ef --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface ListUserCredsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ListUserCredsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A parent database name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. A parent database name of the form
+   * `projects/{project_id}/databases/{database_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsResponse.java new file mode 100644 index 000000000..18bcdedfc --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsResponse.java @@ -0,0 +1,962 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The response for
+ * [FirestoreAdmin.ListUserCreds][google.firestore.admin.v1.FirestoreAdmin.ListUserCreds].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListUserCredsResponse} + */ +public final class ListUserCredsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListUserCredsResponse) + ListUserCredsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListUserCredsResponse.newBuilder() to construct. + private ListUserCredsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListUserCredsResponse() { + userCreds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListUserCredsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListUserCredsResponse.class, + com.google.firestore.admin.v1.ListUserCredsResponse.Builder.class); + } + + public static final int USER_CREDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List userCreds_; + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + @java.lang.Override + public java.util.List getUserCredsList() { + return userCreds_; + } + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + @java.lang.Override + public java.util.List + getUserCredsOrBuilderList() { + return userCreds_; + } + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + @java.lang.Override + public int getUserCredsCount() { + return userCreds_.size(); + } + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds getUserCreds(int index) { + return userCreds_.get(index); + } + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCredsOrBuilder getUserCredsOrBuilder(int index) { + return userCreds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < userCreds_.size(); i++) { + output.writeMessage(1, userCreds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userCreds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userCreds_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.ListUserCredsResponse)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ListUserCredsResponse other = + (com.google.firestore.admin.v1.ListUserCredsResponse) obj; + + if (!getUserCredsList().equals(other.getUserCredsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserCredsCount() > 0) { + hash = (37 * hash) + USER_CREDS_FIELD_NUMBER; + hash = (53 * hash) + getUserCredsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.ListUserCredsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [FirestoreAdmin.ListUserCreds][google.firestore.admin.v1.FirestoreAdmin.ListUserCreds].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListUserCredsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ListUserCredsResponse) + com.google.firestore.admin.v1.ListUserCredsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListUserCredsResponse.class, + com.google.firestore.admin.v1.ListUserCredsResponse.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ListUserCredsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userCredsBuilder_ == null) { + userCreds_ = java.util.Collections.emptyList(); + } else { + userCreds_ = null; + userCredsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListUserCredsResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsResponse getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ListUserCredsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsResponse build() { + com.google.firestore.admin.v1.ListUserCredsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsResponse buildPartial() { + com.google.firestore.admin.v1.ListUserCredsResponse result = + new com.google.firestore.admin.v1.ListUserCredsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.firestore.admin.v1.ListUserCredsResponse result) { + if (userCredsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userCreds_ = java.util.Collections.unmodifiableList(userCreds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userCreds_ = userCreds_; + } else { + result.userCreds_ = userCredsBuilder_.build(); + } + } + + private void buildPartial0(com.google.firestore.admin.v1.ListUserCredsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ListUserCredsResponse) { + return mergeFrom((com.google.firestore.admin.v1.ListUserCredsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ListUserCredsResponse other) { + if (other == com.google.firestore.admin.v1.ListUserCredsResponse.getDefaultInstance()) + return this; + if (userCredsBuilder_ == null) { + if (!other.userCreds_.isEmpty()) { + if (userCreds_.isEmpty()) { + userCreds_ = other.userCreds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserCredsIsMutable(); + userCreds_.addAll(other.userCreds_); + } + onChanged(); + } + } else { + if (!other.userCreds_.isEmpty()) { + if (userCredsBuilder_.isEmpty()) { + userCredsBuilder_.dispose(); + userCredsBuilder_ = null; + userCreds_ = other.userCreds_; + bitField0_ = (bitField0_ & ~0x00000001); + userCredsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUserCredsFieldBuilder() + : null; + } else { + userCredsBuilder_.addAllMessages(other.userCreds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.firestore.admin.v1.UserCreds m = + input.readMessage( + com.google.firestore.admin.v1.UserCreds.parser(), extensionRegistry); + if (userCredsBuilder_ == null) { + ensureUserCredsIsMutable(); + userCreds_.add(m); + } else { + userCredsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List userCreds_ = + java.util.Collections.emptyList(); + + private void ensureUserCredsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userCreds_ = new java.util.ArrayList(userCreds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds, + com.google.firestore.admin.v1.UserCreds.Builder, + com.google.firestore.admin.v1.UserCredsOrBuilder> + userCredsBuilder_; + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public java.util.List getUserCredsList() { + if (userCredsBuilder_ == null) { + return java.util.Collections.unmodifiableList(userCreds_); + } else { + return userCredsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public int getUserCredsCount() { + if (userCredsBuilder_ == null) { + return userCreds_.size(); + } else { + return userCredsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public com.google.firestore.admin.v1.UserCreds getUserCreds(int index) { + if (userCredsBuilder_ == null) { + return userCreds_.get(index); + } else { + return userCredsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder setUserCreds(int index, com.google.firestore.admin.v1.UserCreds value) { + if (userCredsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserCredsIsMutable(); + userCreds_.set(index, value); + onChanged(); + } else { + userCredsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder setUserCreds( + int index, com.google.firestore.admin.v1.UserCreds.Builder builderForValue) { + if (userCredsBuilder_ == null) { + ensureUserCredsIsMutable(); + userCreds_.set(index, builderForValue.build()); + onChanged(); + } else { + userCredsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder addUserCreds(com.google.firestore.admin.v1.UserCreds value) { + if (userCredsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserCredsIsMutable(); + userCreds_.add(value); + onChanged(); + } else { + userCredsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder addUserCreds(int index, com.google.firestore.admin.v1.UserCreds value) { + if (userCredsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserCredsIsMutable(); + userCreds_.add(index, value); + onChanged(); + } else { + userCredsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder addUserCreds(com.google.firestore.admin.v1.UserCreds.Builder builderForValue) { + if (userCredsBuilder_ == null) { + ensureUserCredsIsMutable(); + userCreds_.add(builderForValue.build()); + onChanged(); + } else { + userCredsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder addUserCreds( + int index, com.google.firestore.admin.v1.UserCreds.Builder builderForValue) { + if (userCredsBuilder_ == null) { + ensureUserCredsIsMutable(); + userCreds_.add(index, builderForValue.build()); + onChanged(); + } else { + userCredsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder addAllUserCreds( + java.lang.Iterable values) { + if (userCredsBuilder_ == null) { + ensureUserCredsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userCreds_); + onChanged(); + } else { + userCredsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder clearUserCreds() { + if (userCredsBuilder_ == null) { + userCreds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userCredsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public Builder removeUserCreds(int index) { + if (userCredsBuilder_ == null) { + ensureUserCredsIsMutable(); + userCreds_.remove(index); + onChanged(); + } else { + userCredsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public com.google.firestore.admin.v1.UserCreds.Builder getUserCredsBuilder(int index) { + return getUserCredsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public com.google.firestore.admin.v1.UserCredsOrBuilder getUserCredsOrBuilder(int index) { + if (userCredsBuilder_ == null) { + return userCreds_.get(index); + } else { + return userCredsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public java.util.List + getUserCredsOrBuilderList() { + if (userCredsBuilder_ != null) { + return userCredsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userCreds_); + } + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public com.google.firestore.admin.v1.UserCreds.Builder addUserCredsBuilder() { + return getUserCredsFieldBuilder() + .addBuilder(com.google.firestore.admin.v1.UserCreds.getDefaultInstance()); + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public com.google.firestore.admin.v1.UserCreds.Builder addUserCredsBuilder(int index) { + return getUserCredsFieldBuilder() + .addBuilder(index, com.google.firestore.admin.v1.UserCreds.getDefaultInstance()); + } + + /** + * + * + *
+     * The user creds for the database.
+     * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + public java.util.List + getUserCredsBuilderList() { + return getUserCredsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds, + com.google.firestore.admin.v1.UserCreds.Builder, + com.google.firestore.admin.v1.UserCredsOrBuilder> + getUserCredsFieldBuilder() { + if (userCredsBuilder_ == null) { + userCredsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds, + com.google.firestore.admin.v1.UserCreds.Builder, + com.google.firestore.admin.v1.UserCredsOrBuilder>( + userCreds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + userCreds_ = null; + } + return userCredsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.ListUserCredsResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ListUserCredsResponse) + private static final com.google.firestore.admin.v1.ListUserCredsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ListUserCredsResponse(); + } + + public static com.google.firestore.admin.v1.ListUserCredsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserCredsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListUserCredsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsResponseOrBuilder.java new file mode 100644 index 000000000..b457d5d40 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListUserCredsResponseOrBuilder.java @@ -0,0 +1,82 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface ListUserCredsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ListUserCredsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + java.util.List getUserCredsList(); + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + com.google.firestore.admin.v1.UserCreds getUserCreds(int index); + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + int getUserCredsCount(); + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + java.util.List + getUserCredsOrBuilderList(); + + /** + * + * + *
+   * The user creds for the database.
+   * 
+ * + * repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + com.google.firestore.admin.v1.UserCredsOrBuilder getUserCredsOrBuilder(int index); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.java index 44c0bec1d..abbaf01c7 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/location.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class LocationMetadata extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.LocationMetadata) LocationMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use LocationMetadata.newBuilder() to construct. private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -212,6 +213,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.java index e353e5c69..97035e111 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/location.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface LocationMetadataOrBuilder diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationName.java index 3e4c27491..4826327e4 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.java index 728502634..6c31c40ee 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/location.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class LocationProto { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java index ddd9168cf..d2f2b9515 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class OperationProto { @@ -64,6 +64,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_admin_v1_RestoreDatabaseMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_admin_v1_RestoreDatabaseMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_admin_v1_Progress_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -80,92 +84,102 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n)google/firestore/admin/v1/operation.pr" + "oto\022\031google.firestore.admin.v1\032\031google/a" + "pi/resource.proto\032%google/firestore/admi" - + "n/v1/index.proto\032\037google/protobuf/timest" - + "amp.proto\"\275\002\n\026IndexOperationMetadata\022.\n\n" - + "start_time\030\001 \001(\0132\032.google.protobuf.Times" - + "tamp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\022\r\n\005index\030\003 \001(\t\0228\n\005state\030\004 \001(\016" - + "2).google.firestore.admin.v1.OperationSt" - + "ate\022?\n\022progress_documents\030\005 \001(\0132#.google" - + ".firestore.admin.v1.Progress\022;\n\016progress" - + "_bytes\030\006 \001(\0132#.google.firestore.admin.v1" - + ".Progress\"\231\007\n\026FieldOperationMetadata\022.\n\n" - + "start_time\030\001 \001(\0132\032.google.protobuf.Times" - + "tamp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\022\r\n\005field\030\003 \001(\t\022_\n\023index_confi" - + "g_deltas\030\004 \003(\0132B.google.firestore.admin." - + "v1.FieldOperationMetadata.IndexConfigDel" - + "ta\0228\n\005state\030\005 \001(\0162).google.firestore.adm" - + "in.v1.OperationState\022?\n\022progress_documen" - + "ts\030\006 \001(\0132#.google.firestore.admin.v1.Pro" - + "gress\022;\n\016progress_bytes\030\007 \001(\0132#.google.f" - + "irestore.admin.v1.Progress\022Z\n\020ttl_config" - + "_delta\030\010 \001(\0132@.google.firestore.admin.v1" - + ".FieldOperationMetadata.TtlConfigDelta\032\347" - + "\001\n\020IndexConfigDelta\022b\n\013change_type\030\001 \001(\016" - + "2M.google.firestore.admin.v1.FieldOperat" - + "ionMetadata.IndexConfigDelta.ChangeType\022" - + "/\n\005index\030\002 \001(\0132 .google.firestore.admin." - + "v1.Index\">\n\nChangeType\022\033\n\027CHANGE_TYPE_UN" - + "SPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\032\262\001\n\016Ttl" - + "ConfigDelta\022`\n\013change_type\030\001 \001(\0162K.googl" - + "e.firestore.admin.v1.FieldOperationMetad" - + "ata.TtlConfigDelta.ChangeType\">\n\nChangeT" - + "ype\022\033\n\027CHANGE_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020" - + "\001\022\n\n\006REMOVE\020\002\"\266\003\n\027ExportDocumentsMetadat" - + "a\022.\n\nstart_time\030\001 \001(\0132\032.google.protobuf." - + "Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google.pro" - + "tobuf.Timestamp\022B\n\017operation_state\030\003 \001(\016" - + "2).google.firestore.admin.v1.OperationSt" - + "ate\022?\n\022progress_documents\030\004 \001(\0132#.google" - + ".firestore.admin.v1.Progress\022;\n\016progress" - + "_bytes\030\005 \001(\0132#.google.firestore.admin.v1" - + ".Progress\022\026\n\016collection_ids\030\006 \003(\t\022\031\n\021out" - + "put_uri_prefix\030\007 \001(\t\022\025\n\rnamespace_ids\030\010 " - + "\003(\t\0221\n\rsnapshot_time\030\t \001(\0132\032.google.prot" - + "obuf.Timestamp\"\202\003\n\027ImportDocumentsMetada" - + "ta\022.\n\nstart_time\030\001 \001(\0132\032.google.protobuf" - + ".Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google.pr" - + "otobuf.Timestamp\022B\n\017operation_state\030\003 \001(" - + "\0162).google.firestore.admin.v1.OperationS" - + "tate\022?\n\022progress_documents\030\004 \001(\0132#.googl" - + "e.firestore.admin.v1.Progress\022;\n\016progres" - + "s_bytes\030\005 \001(\0132#.google.firestore.admin.v" - + "1.Progress\022\026\n\016collection_ids\030\006 \003(\t\022\030\n\020in" - + "put_uri_prefix\030\007 \001(\t\022\025\n\rnamespace_ids\030\010 " - + "\003(\t\"\237\003\n\033BulkDeleteDocumentsMetadata\022.\n\ns" - + "tart_time\030\001 \001(\0132\032.google.protobuf.Timest" - + "amp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\022B\n\017operation_state\030\003 \001(\0162).goo" - + "gle.firestore.admin.v1.OperationState\022?\n" - + "\022progress_documents\030\004 \001(\0132#.google.fires" - + "tore.admin.v1.Progress\022;\n\016progress_bytes" - + "\030\005 \001(\0132#.google.firestore.admin.v1.Progr" - + "ess\022\026\n\016collection_ids\030\006 \003(\t\022\025\n\rnamespace" - + "_ids\030\007 \003(\t\0221\n\rsnapshot_time\030\010 \001(\0132\032.goog" - + "le.protobuf.Timestamp\"4\n\027ExportDocuments" - + "Response\022\031\n\021output_uri_prefix\030\001 \001(\t\"\355\002\n\027" - + "RestoreDatabaseMetadata\022.\n\nstart_time\030\001 " - + "\001(\0132\032.google.protobuf.Timestamp\022,\n\010end_t" - + "ime\030\002 \001(\0132\032.google.protobuf.Timestamp\022B\n" - + "\017operation_state\030\003 \001(\0162).google.firestor" - + "e.admin.v1.OperationState\0228\n\010database\030\004 " - + "\001(\tB&\372A#\n!firestore.googleapis.com/Datab" - + "ase\0224\n\006backup\030\005 \001(\tB$\372A!\n\037firestore.goog" - + "leapis.com/Backup\022@\n\023progress_percentage" - + "\030\010 \001(\0132#.google.firestore.admin.v1.Progr" - + "ess\":\n\010Progress\022\026\n\016estimated_work\030\001 \001(\003\022" - + "\026\n\016completed_work\030\002 \001(\003*\236\001\n\016OperationSta" - + "te\022\037\n\033OPERATION_STATE_UNSPECIFIED\020\000\022\020\n\014I" - + "NITIALIZING\020\001\022\016\n\nPROCESSING\020\002\022\016\n\nCANCELL" - + "ING\020\003\022\016\n\nFINALIZING\020\004\022\016\n\nSUCCESSFUL\020\005\022\n\n" - + "\006FAILED\020\006\022\r\n\tCANCELLED\020\007B\335\001\n\035com.google." - + "firestore.admin.v1B\016OperationProtoP\001Z9cl" - + "oud.google.com/go/firestore/apiv1/admin/" - + "adminpb;adminpb\242\002\004GCFS\252\002\037Google.Cloud.Fi" - + "restore.Admin.V1\312\002\037Google\\Cloud\\Firestor" - + "e\\Admin\\V1\352\002#Google::Cloud::Firestore::A" - + "dmin::V1b\006proto3" + + "n/v1/index.proto\032(google/firestore/admin" + + "/v1/snapshot.proto\032\037google/protobuf/time" + + "stamp.proto\"\275\002\n\026IndexOperationMetadata\022." + + "\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estamp\022,\n\010end_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\022\r\n\005index\030\003 \001(\t\0228\n\005state\030\004 \001" + + "(\0162).google.firestore.admin.v1.Operation" + + "State\022?\n\022progress_documents\030\005 \001(\0132#.goog" + + "le.firestore.admin.v1.Progress\022;\n\016progre" + + "ss_bytes\030\006 \001(\0132#.google.firestore.admin." + + "v1.Progress\"\231\007\n\026FieldOperationMetadata\022." + + "\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estamp\022,\n\010end_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\022\r\n\005field\030\003 \001(\t\022_\n\023index_con" + + "fig_deltas\030\004 \003(\0132B.google.firestore.admi" + + "n.v1.FieldOperationMetadata.IndexConfigD" + + "elta\0228\n\005state\030\005 \001(\0162).google.firestore.a" + + "dmin.v1.OperationState\022?\n\022progress_docum" + + "ents\030\006 \001(\0132#.google.firestore.admin.v1.P" + + "rogress\022;\n\016progress_bytes\030\007 \001(\0132#.google" + + ".firestore.admin.v1.Progress\022Z\n\020ttl_conf" + + "ig_delta\030\010 \001(\0132@.google.firestore.admin." + + "v1.FieldOperationMetadata.TtlConfigDelta" + + "\032\347\001\n\020IndexConfigDelta\022b\n\013change_type\030\001 \001" + + "(\0162M.google.firestore.admin.v1.FieldOper" + + "ationMetadata.IndexConfigDelta.ChangeTyp" + + "e\022/\n\005index\030\002 \001(\0132 .google.firestore.admi" + + "n.v1.Index\">\n\nChangeType\022\033\n\027CHANGE_TYPE_" + + "UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\032\262\001\n\016T" + + "tlConfigDelta\022`\n\013change_type\030\001 \001(\0162K.goo" + + "gle.firestore.admin.v1.FieldOperationMet" + + "adata.TtlConfigDelta.ChangeType\">\n\nChang" + + "eType\022\033\n\027CHANGE_TYPE_UNSPECIFIED\020\000\022\007\n\003AD" + + "D\020\001\022\n\n\006REMOVE\020\002\"\266\003\n\027ExportDocumentsMetad" + + "ata\022.\n\nstart_time\030\001 \001(\0132\032.google.protobu" + + "f.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022B\n\017operation_state\030\003 \001" + + "(\0162).google.firestore.admin.v1.Operation" + + "State\022?\n\022progress_documents\030\004 \001(\0132#.goog" + + "le.firestore.admin.v1.Progress\022;\n\016progre" + + "ss_bytes\030\005 \001(\0132#.google.firestore.admin." + + "v1.Progress\022\026\n\016collection_ids\030\006 \003(\t\022\031\n\021o" + + "utput_uri_prefix\030\007 \001(\t\022\025\n\rnamespace_ids\030" + + "\010 \003(\t\0221\n\rsnapshot_time\030\t \001(\0132\032.google.pr" + + "otobuf.Timestamp\"\202\003\n\027ImportDocumentsMeta" + + "data\022.\n\nstart_time\030\001 \001(\0132\032.google.protob" + + "uf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google." + + "protobuf.Timestamp\022B\n\017operation_state\030\003 " + + "\001(\0162).google.firestore.admin.v1.Operatio" + + "nState\022?\n\022progress_documents\030\004 \001(\0132#.goo" + + "gle.firestore.admin.v1.Progress\022;\n\016progr" + + "ess_bytes\030\005 \001(\0132#.google.firestore.admin" + + ".v1.Progress\022\026\n\016collection_ids\030\006 \003(\t\022\030\n\020" + + "input_uri_prefix\030\007 \001(\t\022\025\n\rnamespace_ids\030" + + "\010 \003(\t\"\237\003\n\033BulkDeleteDocumentsMetadata\022.\n" + + "\nstart_time\030\001 \001(\0132\032.google.protobuf.Time" + + "stamp\022,\n\010end_time\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\022B\n\017operation_state\030\003 \001(\0162).g" + + "oogle.firestore.admin.v1.OperationState\022" + + "?\n\022progress_documents\030\004 \001(\0132#.google.fir" + + "estore.admin.v1.Progress\022;\n\016progress_byt" + + "es\030\005 \001(\0132#.google.firestore.admin.v1.Pro" + + "gress\022\026\n\016collection_ids\030\006 \003(\t\022\025\n\rnamespa" + + "ce_ids\030\007 \003(\t\0221\n\rsnapshot_time\030\010 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\"4\n\027ExportDocumen" + + "tsResponse\022\031\n\021output_uri_prefix\030\001 \001(\t\"\355\002" + + "\n\027RestoreDatabaseMetadata\022.\n\nstart_time\030" + + "\001 \001(\0132\032.google.protobuf.Timestamp\022,\n\010end" + + "_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022" + + "B\n\017operation_state\030\003 \001(\0162).google.firest" + + "ore.admin.v1.OperationState\0228\n\010database\030" + + "\004 \001(\tB&\372A#\n!firestore.googleapis.com/Dat" + + "abase\0224\n\006backup\030\005 \001(\tB$\372A!\n\037firestore.go" + + "ogleapis.com/Backup\022@\n\023progress_percenta" + + "ge\030\010 \001(\0132#.google.firestore.admin.v1.Pro" + + "gress\"\365\002\n\025CloneDatabaseMetadata\022.\n\nstart" + + "_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022" + + ",\n\010end_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\022B\n\017operation_state\030\003 \001(\0162).google." + + "firestore.admin.v1.OperationState\0228\n\010dat" + + "abase\030\004 \001(\tB&\372A#\n!firestore.googleapis.c" + + "om/Database\022>\n\rpitr_snapshot\030\007 \001(\0132\'.goo" + + "gle.firestore.admin.v1.PitrSnapshot\022@\n\023p" + + "rogress_percentage\030\006 \001(\0132#.google.firest" + + "ore.admin.v1.Progress\":\n\010Progress\022\026\n\016est" + + "imated_work\030\001 \001(\003\022\026\n\016completed_work\030\002 \001(" + + "\003*\236\001\n\016OperationState\022\037\n\033OPERATION_STATE_" + + "UNSPECIFIED\020\000\022\020\n\014INITIALIZING\020\001\022\016\n\nPROCE" + + "SSING\020\002\022\016\n\nCANCELLING\020\003\022\016\n\nFINALIZING\020\004\022" + + "\016\n\nSUCCESSFUL\020\005\022\n\n\006FAILED\020\006\022\r\n\tCANCELLED" + + "\020\007B\335\001\n\035com.google.firestore.admin.v1B\016Op" + + "erationProtoP\001Z9cloud.google.com/go/fire" + + "store/apiv1/admin/adminpb;adminpb\242\002\004GCFS" + + "\252\002\037Google.Cloud.Firestore.Admin.V1\312\002\037Goo" + + "gle\\Cloud\\Firestore\\Admin\\V1\352\002#Google::C" + + "loud::Firestore::Admin::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -173,6 +187,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.ResourceProto.getDescriptor(), com.google.firestore.admin.v1.IndexProto.getDescriptor(), + com.google.firestore.admin.v1.PitrSnapshotProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_firestore_admin_v1_IndexOperationMetadata_descriptor = @@ -280,8 +295,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "StartTime", "EndTime", "OperationState", "Database", "Backup", "ProgressPercentage", }); - internal_static_google_firestore_admin_v1_Progress_descriptor = + internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_CloneDatabaseMetadata_descriptor, + new java.lang.String[] { + "StartTime", + "EndTime", + "OperationState", + "Database", + "PitrSnapshot", + "ProgressPercentage", + }); + internal_static_google_firestore_admin_v1_Progress_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_google_firestore_admin_v1_Progress_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_Progress_descriptor, @@ -295,6 +323,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor, registry); com.google.api.ResourceProto.getDescriptor(); com.google.firestore.admin.v1.IndexProto.getDescriptor(); + com.google.firestore.admin.v1.PitrSnapshotProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java index 3cb9a142e..4aceabad4 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -124,6 +124,7 @@ public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { * OPERATION_STATE_UNSPECIFIED = 0; */ public static final int OPERATION_STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -134,6 +135,7 @@ public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { * INITIALIZING = 1; */ public static final int INITIALIZING_VALUE = 1; + /** * * @@ -144,6 +146,7 @@ public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { * PROCESSING = 2; */ public static final int PROCESSING_VALUE = 2; + /** * * @@ -155,6 +158,7 @@ public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { * CANCELLING = 3; */ public static final int CANCELLING_VALUE = 3; + /** * * @@ -165,6 +169,7 @@ public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { * FINALIZING = 4; */ public static final int FINALIZING_VALUE = 4; + /** * * @@ -175,6 +180,7 @@ public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { * SUCCESSFUL = 5; */ public static final int SUCCESSFUL_VALUE = 5; + /** * * @@ -185,6 +191,7 @@ public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { * FAILED = 6; */ public static final int FAILED_VALUE = 6; + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshot.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshot.java new file mode 100644 index 000000000..276174a1e --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshot.java @@ -0,0 +1,1066 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/snapshot.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * A consistent snapshot of a database at a specific point in time.
+ * A PITR (Point-in-time recovery) snapshot with previous versions of a
+ * database's data is available for every minute up to the associated database's
+ * data retention period. If the PITR feature is enabled, the retention period
+ * is 7 days; otherwise, it is one hour.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.PitrSnapshot} + */ +public final class PitrSnapshot extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.PitrSnapshot) + PitrSnapshotOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PitrSnapshot.newBuilder() to construct. + private PitrSnapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PitrSnapshot() { + database_ = ""; + databaseUid_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PitrSnapshot(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.PitrSnapshotProto + .internal_static_google_firestore_admin_v1_PitrSnapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.PitrSnapshotProto + .internal_static_google_firestore_admin_v1_PitrSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.PitrSnapshot.class, + com.google.firestore.admin.v1.PitrSnapshot.Builder.class); + } + + private int bitField0_; + public static final int DATABASE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + + /** + * + * + *
+   * Required. The name of the database that this was a snapshot of. Format:
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the database that this was a snapshot of. Format:
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_UID_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString databaseUid_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * Output only. Public UUID of the database the snapshot was associated with.
+   * 
+ * + * bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The databaseUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseUid() { + return databaseUid_; + } + + public static final int SNAPSHOT_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp snapshotTime_; + + /** + * + * + *
+   * Required. Snapshot time of the database.
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the snapshotTime field is set. + */ + @java.lang.Override + public boolean hasSnapshotTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Snapshot time of the database.
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The snapshotTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSnapshotTime() { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } + + /** + * + * + *
+   * Required. Snapshot time of the database.
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + if (!databaseUid_.isEmpty()) { + output.writeBytes(2, databaseUid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSnapshotTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + if (!databaseUid_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, databaseUid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSnapshotTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.PitrSnapshot)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.PitrSnapshot other = + (com.google.firestore.admin.v1.PitrSnapshot) obj; + + if (!getDatabase().equals(other.getDatabase())) return false; + if (!getDatabaseUid().equals(other.getDatabaseUid())) return false; + if (hasSnapshotTime() != other.hasSnapshotTime()) return false; + if (hasSnapshotTime()) { + if (!getSnapshotTime().equals(other.getSnapshotTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + hash = (37 * hash) + DATABASE_UID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseUid().hashCode(); + if (hasSnapshotTime()) { + hash = (37 * hash) + SNAPSHOT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSnapshotTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.PitrSnapshot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.PitrSnapshot prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A consistent snapshot of a database at a specific point in time.
+   * A PITR (Point-in-time recovery) snapshot with previous versions of a
+   * database's data is available for every minute up to the associated database's
+   * data retention period. If the PITR feature is enabled, the retention period
+   * is 7 days; otherwise, it is one hour.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.PitrSnapshot} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.PitrSnapshot) + com.google.firestore.admin.v1.PitrSnapshotOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.PitrSnapshotProto + .internal_static_google_firestore_admin_v1_PitrSnapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.PitrSnapshotProto + .internal_static_google_firestore_admin_v1_PitrSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.PitrSnapshot.class, + com.google.firestore.admin.v1.PitrSnapshot.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.PitrSnapshot.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSnapshotTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + database_ = ""; + databaseUid_ = com.google.protobuf.ByteString.EMPTY; + snapshotTime_ = null; + if (snapshotTimeBuilder_ != null) { + snapshotTimeBuilder_.dispose(); + snapshotTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.PitrSnapshotProto + .internal_static_google_firestore_admin_v1_PitrSnapshot_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshot getDefaultInstanceForType() { + return com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshot build() { + com.google.firestore.admin.v1.PitrSnapshot result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshot buildPartial() { + com.google.firestore.admin.v1.PitrSnapshot result = + new com.google.firestore.admin.v1.PitrSnapshot(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.PitrSnapshot result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.database_ = database_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.databaseUid_ = databaseUid_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.snapshotTime_ = + snapshotTimeBuilder_ == null ? snapshotTime_ : snapshotTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.PitrSnapshot) { + return mergeFrom((com.google.firestore.admin.v1.PitrSnapshot) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.PitrSnapshot other) { + if (other == com.google.firestore.admin.v1.PitrSnapshot.getDefaultInstance()) return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDatabaseUid() != com.google.protobuf.ByteString.EMPTY) { + setDatabaseUid(other.getDatabaseUid()); + } + if (other.hasSnapshotTime()) { + mergeSnapshotTime(other.getSnapshotTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + databaseUid_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSnapshotTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object database_ = ""; + + /** + * + * + *
+     * Required. The name of the database that this was a snapshot of. Format:
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the database that this was a snapshot of. Format:
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for database. + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the database that this was a snapshot of. Format:
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the database that this was a snapshot of. Format:
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the database that this was a snapshot of. Format:
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString databaseUid_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * Output only. Public UUID of the database the snapshot was associated with.
+     * 
+ * + * bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The databaseUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseUid() { + return databaseUid_; + } + + /** + * + * + *
+     * Output only. Public UUID of the database the snapshot was associated with.
+     * 
+ * + * bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The databaseUid to set. + * @return This builder for chaining. + */ + public Builder setDatabaseUid(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + databaseUid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Public UUID of the database the snapshot was associated with.
+     * 
+ * + * bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseUid() { + bitField0_ = (bitField0_ & ~0x00000002); + databaseUid_ = getDefaultInstance().getDatabaseUid(); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp snapshotTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + snapshotTimeBuilder_; + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the snapshotTime field is set. + */ + public boolean hasSnapshotTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The snapshotTime. + */ + public com.google.protobuf.Timestamp getSnapshotTime() { + if (snapshotTimeBuilder_ == null) { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } else { + return snapshotTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSnapshotTime(com.google.protobuf.Timestamp value) { + if (snapshotTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + snapshotTime_ = value; + } else { + snapshotTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSnapshotTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (snapshotTimeBuilder_ == null) { + snapshotTime_ = builderForValue.build(); + } else { + snapshotTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSnapshotTime(com.google.protobuf.Timestamp value) { + if (snapshotTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && snapshotTime_ != null + && snapshotTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSnapshotTimeBuilder().mergeFrom(value); + } else { + snapshotTime_ = value; + } + } else { + snapshotTimeBuilder_.mergeFrom(value); + } + if (snapshotTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSnapshotTime() { + bitField0_ = (bitField0_ & ~0x00000004); + snapshotTime_ = null; + if (snapshotTimeBuilder_ != null) { + snapshotTimeBuilder_.dispose(); + snapshotTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getSnapshotTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSnapshotTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { + if (snapshotTimeBuilder_ != null) { + return snapshotTimeBuilder_.getMessageOrBuilder(); + } else { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } + } + + /** + * + * + *
+     * Required. Snapshot time of the database.
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getSnapshotTimeFieldBuilder() { + if (snapshotTimeBuilder_ == null) { + snapshotTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSnapshotTime(), getParentForChildren(), isClean()); + snapshotTime_ = null; + } + return snapshotTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.PitrSnapshot) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.PitrSnapshot) + private static final com.google.firestore.admin.v1.PitrSnapshot DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.PitrSnapshot(); + } + + public static com.google.firestore.admin.v1.PitrSnapshot getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PitrSnapshot parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.PitrSnapshot getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshotOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshotOrBuilder.java new file mode 100644 index 000000000..f24cc50e0 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshotOrBuilder.java @@ -0,0 +1,111 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/snapshot.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface PitrSnapshotOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.PitrSnapshot) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the database that this was a snapshot of. Format:
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The database. + */ + java.lang.String getDatabase(); + + /** + * + * + *
+   * Required. The name of the database that this was a snapshot of. Format:
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for database. + */ + com.google.protobuf.ByteString getDatabaseBytes(); + + /** + * + * + *
+   * Output only. Public UUID of the database the snapshot was associated with.
+   * 
+ * + * bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The databaseUid. + */ + com.google.protobuf.ByteString getDatabaseUid(); + + /** + * + * + *
+   * Required. Snapshot time of the database.
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the snapshotTime field is set. + */ + boolean hasSnapshotTime(); + + /** + * + * + *
+   * Required. Snapshot time of the database.
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The snapshotTime. + */ + com.google.protobuf.Timestamp getSnapshotTime(); + + /** + * + * + *
+   * Required. Snapshot time of the database.
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshotProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshotProto.java new file mode 100644 index 000000000..a57e08b75 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/PitrSnapshotProto.java @@ -0,0 +1,87 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/snapshot.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public final class PitrSnapshotProto { + private PitrSnapshotProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_PitrSnapshot_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_PitrSnapshot_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/firestore/admin/v1/snapshot.pro" + + "to\022\031google.firestore.admin.v1\032\037google/ap" + + "i/field_behavior.proto\032\031google/api/resou" + + "rce.proto\032\037google/protobuf/timestamp.pro" + + "to\"\236\001\n\014PitrSnapshot\022;\n\010database\030\001 \001(\tB)\340" + + "A\002\372A#\n!firestore.googleapis.com/Database" + + "\022\031\n\014database_uid\030\002 \001(\014B\003\340A\003\0226\n\rsnapshot_" + + "time\030\003 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\002B\340\001\n\035com.google.firestore.admin.v1B\021P" + + "itrSnapshotProtoP\001Z9cloud.google.com/go/" + + "firestore/apiv1/admin/adminpb;adminpb\242\002\004" + + "GCFS\252\002\037Google.Cloud.Firestore.Admin.V1\312\002" + + "\037Google\\Cloud\\Firestore\\Admin\\V1\352\002#Googl" + + "e::Cloud::Firestore::Admin::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_firestore_admin_v1_PitrSnapshot_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_admin_v1_PitrSnapshot_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_PitrSnapshot_descriptor, + new java.lang.String[] { + "Database", "DatabaseUid", "SnapshotTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java index 97392a536..ba8233c4b 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -35,6 +35,7 @@ public final class Progress extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Progress) ProgressOrBuilder { private static final long serialVersionUID = 0L; + // Use Progress.newBuilder() to construct. private Progress(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int ESTIMATED_WORK_FIELD_NUMBER = 1; private long estimatedWork_ = 0L; + /** * * @@ -83,6 +85,7 @@ public long getEstimatedWork() { public static final int COMPLETED_WORK_FIELD_NUMBER = 2; private long completedWork_ = 0L; + /** * * @@ -266,6 +269,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -462,6 +466,7 @@ public Builder mergeFrom( private int bitField0_; private long estimatedWork_; + /** * * @@ -477,6 +482,7 @@ public Builder mergeFrom( public long getEstimatedWork() { return estimatedWork_; } + /** * * @@ -496,6 +502,7 @@ public Builder setEstimatedWork(long value) { onChanged(); return this; } + /** * * @@ -515,6 +522,7 @@ public Builder clearEstimatedWork() { } private long completedWork_; + /** * * @@ -530,6 +538,7 @@ public Builder clearEstimatedWork() { public long getCompletedWork() { return completedWork_; } + /** * * @@ -549,6 +558,7 @@ public Builder setCompletedWork(long value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.java index 04706cfdd..df7109cd1 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface ProgressOrBuilder diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProjectName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProjectName.java index 3d6a8c946..6beb4fa40 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProjectName.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProjectName.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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ResetUserPasswordRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ResetUserPasswordRequest.java new file mode 100644 index 000000000..84c975621 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ResetUserPasswordRequest.java @@ -0,0 +1,658 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.ResetUserPassword][google.firestore.admin.v1.FirestoreAdmin.ResetUserPassword].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ResetUserPasswordRequest} + */ +public final class ResetUserPasswordRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ResetUserPasswordRequest) + ResetUserPasswordRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ResetUserPasswordRequest.newBuilder() to construct. + private ResetUserPasswordRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResetUserPasswordRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResetUserPasswordRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ResetUserPasswordRequest.class, + com.google.firestore.admin.v1.ResetUserPasswordRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.ResetUserPasswordRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ResetUserPasswordRequest other = + (com.google.firestore.admin.v1.ResetUserPasswordRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.ResetUserPasswordRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [FirestoreAdmin.ResetUserPassword][google.firestore.admin.v1.FirestoreAdmin.ResetUserPassword].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ResetUserPasswordRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ResetUserPasswordRequest) + com.google.firestore.admin.v1.ResetUserPasswordRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ResetUserPasswordRequest.class, + com.google.firestore.admin.v1.ResetUserPasswordRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ResetUserPasswordRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ResetUserPasswordRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ResetUserPasswordRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ResetUserPasswordRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ResetUserPasswordRequest build() { + com.google.firestore.admin.v1.ResetUserPasswordRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ResetUserPasswordRequest buildPartial() { + com.google.firestore.admin.v1.ResetUserPasswordRequest result = + new com.google.firestore.admin.v1.ResetUserPasswordRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.ResetUserPasswordRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ResetUserPasswordRequest) { + return mergeFrom((com.google.firestore.admin.v1.ResetUserPasswordRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ResetUserPasswordRequest other) { + if (other == com.google.firestore.admin.v1.ResetUserPasswordRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A name of the form
+     * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.ResetUserPasswordRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ResetUserPasswordRequest) + private static final com.google.firestore.admin.v1.ResetUserPasswordRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ResetUserPasswordRequest(); + } + + public static com.google.firestore.admin.v1.ResetUserPasswordRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResetUserPasswordRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ResetUserPasswordRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ResetUserPasswordRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ResetUserPasswordRequestOrBuilder.java new file mode 100644 index 000000000..376b8ad6e --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ResetUserPasswordRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface ResetUserPasswordRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ResetUserPasswordRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the form
+   * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadata.java index d34f928c7..32065b1e7 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class RestoreDatabaseMetadata extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.RestoreDatabaseMetadata) RestoreDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use RestoreDatabaseMetadata.newBuilder() to construct. private RestoreDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int START_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -84,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +102,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -115,6 +119,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -130,6 +135,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -145,6 +151,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -161,6 +168,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int OPERATION_STATE_FIELD_NUMBER = 3; private int operationState_ = 0; + /** * * @@ -176,6 +184,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -198,6 +207,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -221,6 +231,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -249,6 +260,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { @SuppressWarnings("serial") private volatile java.lang.Object backup_ = ""; + /** * * @@ -272,6 +284,7 @@ public java.lang.String getBackup() { return s; } } + /** * * @@ -298,6 +311,7 @@ public com.google.protobuf.ByteString getBackupBytes() { public static final int PROGRESS_PERCENTAGE_FIELD_NUMBER = 8; private com.google.firestore.admin.v1.Progress progressPercentage_; + /** * * @@ -313,6 +327,7 @@ public com.google.protobuf.ByteString getBackupBytes() { public boolean hasProgressPercentage() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -330,6 +345,7 @@ public com.google.firestore.admin.v1.Progress getProgressPercentage() { ? com.google.firestore.admin.v1.Progress.getDefaultInstance() : progressPercentage_; } + /** * * @@ -568,6 +584,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -857,6 +874,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -871,6 +889,7 @@ public Builder mergeFrom( public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -889,6 +908,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -911,6 +931,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -930,6 +951,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -957,6 +979,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -976,6 +999,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -990,6 +1014,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1006,6 +1031,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1038,6 +1064,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1052,6 +1079,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1070,6 +1098,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1092,6 +1121,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1111,6 +1141,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1138,6 +1169,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1157,6 +1189,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1171,6 +1204,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1187,6 +1221,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1214,6 +1249,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private int operationState_ = 0; + /** * * @@ -1229,6 +1265,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getOperationStateValue() { return operationState_; } + /** * * @@ -1247,6 +1284,7 @@ public Builder setOperationStateValue(int value) { onChanged(); return this; } + /** * * @@ -1264,6 +1302,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { com.google.firestore.admin.v1.OperationState.forNumber(operationState_); return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; } + /** * * @@ -1285,6 +1324,7 @@ public Builder setOperationState(com.google.firestore.admin.v1.OperationState va onChanged(); return this; } + /** * * @@ -1304,6 +1344,7 @@ public Builder clearOperationState() { } private java.lang.Object database_ = ""; + /** * * @@ -1326,6 +1367,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -1348,6 +1390,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1369,6 +1412,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1386,6 +1430,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -1410,6 +1455,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private java.lang.Object backup_ = ""; + /** * * @@ -1432,6 +1478,7 @@ public java.lang.String getBackup() { return (java.lang.String) ref; } } + /** * * @@ -1454,6 +1501,7 @@ public com.google.protobuf.ByteString getBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1475,6 +1523,7 @@ public Builder setBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1492,6 +1541,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -1521,6 +1571,7 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { com.google.firestore.admin.v1.Progress.Builder, com.google.firestore.admin.v1.ProgressOrBuilder> progressPercentageBuilder_; + /** * * @@ -1535,6 +1586,7 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { public boolean hasProgressPercentage() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -1555,6 +1607,7 @@ public com.google.firestore.admin.v1.Progress getProgressPercentage() { return progressPercentageBuilder_.getMessage(); } } + /** * * @@ -1577,6 +1630,7 @@ public Builder setProgressPercentage(com.google.firestore.admin.v1.Progress valu onChanged(); return this; } + /** * * @@ -1597,6 +1651,7 @@ public Builder setProgressPercentage( onChanged(); return this; } + /** * * @@ -1624,6 +1679,7 @@ public Builder mergeProgressPercentage(com.google.firestore.admin.v1.Progress va } return this; } + /** * * @@ -1643,6 +1699,7 @@ public Builder clearProgressPercentage() { onChanged(); return this; } + /** * * @@ -1657,6 +1714,7 @@ public com.google.firestore.admin.v1.Progress.Builder getProgressPercentageBuild onChanged(); return getProgressPercentageFieldBuilder().getBuilder(); } + /** * * @@ -1675,6 +1733,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressPercentageOrBu : progressPercentage_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadataOrBuilder.java index 607e33338..9c9f4a518 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/operation.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface RestoreDatabaseMetadataOrBuilder @@ -36,6 +36,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -48,6 +49,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -71,6 +73,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -83,6 +86,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -106,6 +110,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return The enum numeric value on the wire for operationState. */ int getOperationStateValue(); + /** * * @@ -131,6 +136,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -156,6 +162,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return The backup. */ java.lang.String getBackup(); + /** * * @@ -181,6 +188,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return Whether the progressPercentage field is set. */ boolean hasProgressPercentage(); + /** * * @@ -193,6 +201,7 @@ public interface RestoreDatabaseMetadataOrBuilder * @return The progressPercentage. */ com.google.firestore.admin.v1.Progress getProgressPercentage(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequest.java index 4afad3b7e..2e144f05e 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -24,7 +24,7 @@ * *
  * The request message for
- * [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.RestoreDatabase].
+ * [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase].
  * 
* * Protobuf type {@code google.firestore.admin.v1.RestoreDatabaseRequest} @@ -34,6 +34,7 @@ public final class RestoreDatabaseRequest extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.RestoreDatabaseRequest) RestoreDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use RestoreDatabaseRequest.newBuilder() to construct. private RestoreDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -56,6 +57,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -66,10 +79,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.firestore.admin.v1.RestoreDatabaseRequest.Builder.class); } + private int bitField0_; public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +111,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -127,19 +143,20 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object databaseId_ = ""; + /** * * *
    * Required. The ID to use for the database, which will become the final
-   * component of the database's resource name. This database id must not be
+   * component of the database's resource name. This database ID must not be
    * associated with an existing database.
    *
    * 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.
    * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -158,19 +175,20 @@ public java.lang.String getDatabaseId() { return s; } } + /** * * *
    * Required. The ID to use for the database, which will become the final
-   * component of the database's resource name. This database id must not be
+   * component of the database's resource name. This database ID must not be
    * associated with an existing database.
    *
    * 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.
    * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -194,6 +212,7 @@ public com.google.protobuf.ByteString getDatabaseIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object backup_ = ""; + /** * * @@ -201,6 +220,9 @@ public com.google.protobuf.ByteString getDatabaseIdBytes() { * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` *
* @@ -222,6 +244,7 @@ public java.lang.String getBackup() { return s; } } + /** * * @@ -229,6 +252,9 @@ public java.lang.String getBackup() { * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -251,6 +277,205 @@ public com.google.protobuf.ByteString getBackupBytes() { } } + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 9; + private com.google.firestore.admin.v1.Database.EncryptionConfig encryptionConfig_; + + /** + * + * + *
+   * Optional. Encryption configuration for the restored database.
+   *
+   * If this field is not specified, the restored database will use
+   * the same encryption configuration as the backup, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Encryption configuration for the restored database.
+   *
+   * If this field is not specified, the restored database will use
+   * the same encryption configuration as the backup, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + /** + * + * + *
+   * Optional. Encryption configuration for the restored database.
+   *
+   * If this field is not specified, the restored database will use
+   * the same encryption configuration as the backup, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + public static final int TAGS_FIELD_NUMBER = 10; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -274,6 +499,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backup_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(9, getEncryptionConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 10); getUnknownFields().writeTo(output); } @@ -292,6 +522,19 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backup_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEncryptionConfig()); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, tags__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -311,6 +554,11 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getDatabaseId().equals(other.getDatabaseId())) return false; if (!getBackup().equals(other.getBackup())) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,6 +576,14 @@ public int hashCode() { hash = (53 * hash) + getDatabaseId().hashCode(); hash = (37 * hash) + BACKUP_FIELD_NUMBER; hash = (53 * hash) + getBackup().hashCode(); + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -428,12 +684,13 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * *
    * The request message for
-   * [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.RestoreDatabase].
+   * [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase].
    * 
* * Protobuf type {@code google.firestore.admin.v1.RestoreDatabaseRequest} @@ -447,6 +704,28 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetMutableTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -458,10 +737,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.firestore.admin.v1.RestoreDatabaseRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEncryptionConfigFieldBuilder(); + } } @java.lang.Override @@ -471,6 +759,12 @@ public Builder clear() { parent_ = ""; databaseId_ = ""; backup_ = ""; + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + internalGetMutableTags().clear(); return this; } @@ -516,6 +810,17 @@ private void buildPartial0(com.google.firestore.admin.v1.RestoreDatabaseRequest if (((from_bitField0_ & 0x00000004) != 0)) { result.backup_ = backup_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.encryptionConfig_ = + encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -579,6 +884,11 @@ public Builder mergeFrom(com.google.firestore.admin.v1.RestoreDatabaseRequest ot bitField0_ |= 0x00000004; onChanged(); } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00000010; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -623,6 +933,22 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 74: + { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 74 + case 82: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -643,6 +969,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -668,6 +995,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -693,6 +1021,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -717,6 +1046,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -737,6 +1067,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -764,19 +1095,20 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object databaseId_ = ""; + /** * * *
      * Required. The ID to use for the database, which will become the final
-     * component of the database's resource name. This database id must not be
+     * component of the database's resource name. This database ID must not be
      * associated with an existing database.
      *
      * 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.
      * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -794,19 +1126,20 @@ public java.lang.String getDatabaseId() { return (java.lang.String) ref; } } + /** * * *
      * Required. The ID to use for the database, which will become the final
-     * component of the database's resource name. This database id must not be
+     * component of the database's resource name. This database ID must not be
      * associated with an existing database.
      *
      * 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.
      * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -824,19 +1157,20 @@ public com.google.protobuf.ByteString getDatabaseIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
      * Required. The ID to use for the database, which will become the final
-     * component of the database's resource name. This database id must not be
+     * component of the database's resource name. This database ID must not be
      * associated with an existing database.
      *
      * 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.
      * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -853,19 +1187,20 @@ public Builder setDatabaseId(java.lang.String value) { onChanged(); return this; } + /** * * *
      * Required. The ID to use for the database, which will become the final
-     * component of the database's resource name. This database id must not be
+     * component of the database's resource name. This database ID must not be
      * associated with an existing database.
      *
      * 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.
      * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -878,19 +1213,20 @@ public Builder clearDatabaseId() { onChanged(); return this; } + /** * * *
      * Required. The ID to use for the database, which will become the final
-     * component of the database's resource name. This database id must not be
+     * component of the database's resource name. This database ID must not be
      * associated with an existing database.
      *
      * 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.
      * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -910,6 +1246,7 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object backup_ = ""; + /** * * @@ -917,6 +1254,9 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -937,6 +1277,7 @@ public java.lang.String getBackup() { return (java.lang.String) ref; } } + /** * * @@ -944,6 +1285,9 @@ public java.lang.String getBackup() { * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -964,6 +1308,7 @@ public com.google.protobuf.ByteString getBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -971,6 +1316,9 @@ public com.google.protobuf.ByteString getBackupBytes() { * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -990,6 +1338,7 @@ public Builder setBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -997,6 +1346,9 @@ public Builder setBackup(java.lang.String value) { * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -1012,6 +1364,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -1019,6 +1372,9 @@ public Builder clearBackup() { * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -1040,6 +1396,467 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.firestore.admin.v1.Database.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + public com.google.firestore.admin.v1.Database.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.firestore.admin.v1.Database.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionConfig( + com.google.firestore.admin.v1.Database.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && encryptionConfig_ != null + && encryptionConfig_ + != com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + if (encryptionConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.admin.v1.Database.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.firestore.admin.v1.Database.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + + /** + * + * + *
+     * Optional. Encryption configuration for the restored database.
+     *
+     * If this field is not specified, the restored database will use
+     * the same encryption configuration as the backup, namely
+     * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+     * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Database.EncryptionConfig, + com.google.firestore.admin.v1.Database.EncryptionConfig.Builder, + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the restored database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the restored database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the restored database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the restored database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the restored database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + bitField0_ |= 0x00000010; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the restored database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableTags().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. Immutable. Tags to be bound to the restored database.
+     *
+     * The tags should be provided in the format of
+     * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+     * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequestOrBuilder.java index a1b317b9f..ba970e9f6 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/RestoreDatabaseRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface RestoreDatabaseRequestOrBuilder @@ -39,6 +39,7 @@ public interface RestoreDatabaseRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -60,14 +61,14 @@ public interface RestoreDatabaseRequestOrBuilder * *
    * Required. The ID to use for the database, which will become the final
-   * component of the database's resource name. This database id must not be
+   * component of the database's resource name. This database ID must not be
    * associated with an existing database.
    *
    * 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.
    * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -75,19 +76,20 @@ public interface RestoreDatabaseRequestOrBuilder * @return The databaseId. */ java.lang.String getDatabaseId(); + /** * * *
    * Required. The ID to use for the database, which will become the final
-   * component of the database's resource name. This database id must not be
+   * component of the database's resource name. This database ID must not be
    * associated with an existing database.
    *
    * 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.
    * 
* * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -103,6 +105,9 @@ public interface RestoreDatabaseRequestOrBuilder * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -113,6 +118,7 @@ public interface RestoreDatabaseRequestOrBuilder * @return The backup. */ java.lang.String getBackup(); + /** * * @@ -120,6 +126,9 @@ public interface RestoreDatabaseRequestOrBuilder * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` * * @@ -130,4 +139,147 @@ public interface RestoreDatabaseRequestOrBuilder * @return The bytes for backup. */ com.google.protobuf.ByteString getBackupBytes(); + + /** + * + * + *
+   * Optional. Encryption configuration for the restored database.
+   *
+   * If this field is not specified, the restored database will use
+   * the same encryption configuration as the backup, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + + /** + * + * + *
+   * Optional. Encryption configuration for the restored database.
+   *
+   * If this field is not specified, the restored database will use
+   * the same encryption configuration as the backup, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + com.google.firestore.admin.v1.Database.EncryptionConfig getEncryptionConfig(); + + /** + * + * + *
+   * Optional. Encryption configuration for the restored database.
+   *
+   * If this field is not specified, the restored database will use
+   * the same encryption configuration as the backup, namely
+   * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption].
+   * 
+ * + * + * .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.admin.v1.Database.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsTags(java.lang.String key); + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getTagsMap(); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Immutable. Tags to be bound to the restored database.
+   *
+   * The tags should be provided in the format of
+   * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.
+   * 
+ * + * + * map<string, string> tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getTagsOrThrow(java.lang.String key); } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ScheduleProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ScheduleProto.java index 8bcd70222..9548675ee 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ScheduleProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ScheduleProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/schedule.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public final class ScheduleProto { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequest.java index 50704d968..5828fd607 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class UpdateBackupScheduleRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.UpdateBackupScheduleRequest) UpdateBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateBackupScheduleRequest.newBuilder() to construct. private UpdateBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int BACKUP_SCHEDULE_FIELD_NUMBER = 1; private com.google.firestore.admin.v1.BackupSchedule backupSchedule_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasBackupSchedule() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -101,6 +104,7 @@ public com.google.firestore.admin.v1.BackupSchedule getBackupSchedule() { ? com.google.firestore.admin.v1.BackupSchedule.getDefaultInstance() : backupSchedule_; } + /** * * @@ -121,6 +125,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupScheduleOr public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -136,6 +141,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupScheduleOr public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -151,6 +157,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -344,6 +351,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -568,6 +576,7 @@ public Builder mergeFrom( com.google.firestore.admin.v1.BackupSchedule.Builder, com.google.firestore.admin.v1.BackupScheduleOrBuilder> backupScheduleBuilder_; + /** * * @@ -584,6 +593,7 @@ public Builder mergeFrom( public boolean hasBackupSchedule() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -606,6 +616,7 @@ public com.google.firestore.admin.v1.BackupSchedule getBackupSchedule() { return backupScheduleBuilder_.getMessage(); } } + /** * * @@ -630,6 +641,7 @@ public Builder setBackupSchedule(com.google.firestore.admin.v1.BackupSchedule va onChanged(); return this; } + /** * * @@ -652,6 +664,7 @@ public Builder setBackupSchedule( onChanged(); return this; } + /** * * @@ -682,6 +695,7 @@ public Builder mergeBackupSchedule(com.google.firestore.admin.v1.BackupSchedule } return this; } + /** * * @@ -703,6 +717,7 @@ public Builder clearBackupSchedule() { onChanged(); return this; } + /** * * @@ -719,6 +734,7 @@ public com.google.firestore.admin.v1.BackupSchedule.Builder getBackupScheduleBui onChanged(); return getBackupScheduleFieldBuilder().getBuilder(); } + /** * * @@ -739,6 +755,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupScheduleOr : backupSchedule_; } } + /** * * @@ -773,6 +790,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupScheduleOr com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -787,6 +805,7 @@ public com.google.firestore.admin.v1.BackupScheduleOrBuilder getBackupScheduleOr public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -807,6 +826,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -829,6 +849,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -848,6 +869,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -875,6 +897,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -894,6 +917,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -908,6 +932,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -926,6 +951,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequestOrBuilder.java index 347c89d92..1d895b5a6 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateBackupScheduleRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface UpdateBackupScheduleRequestOrBuilder @@ -38,6 +38,7 @@ public interface UpdateBackupScheduleRequestOrBuilder * @return Whether the backupSchedule field is set. */ boolean hasBackupSchedule(); + /** * * @@ -52,6 +53,7 @@ public interface UpdateBackupScheduleRequestOrBuilder * @return The backupSchedule. */ com.google.firestore.admin.v1.BackupSchedule getBackupSchedule(); + /** * * @@ -77,6 +79,7 @@ public interface UpdateBackupScheduleRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -89,6 +92,7 @@ public interface UpdateBackupScheduleRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadata.java index 5c6a90911..0a033ce06 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadata.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -33,6 +33,7 @@ public final class UpdateDatabaseMetadata extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.UpdateDatabaseMetadata) UpdateDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateDatabaseMetadata.newBuilder() to construct. private UpdateDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -211,6 +212,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadataOrBuilder.java index 228f2c064..1b68a7b91 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseMetadataOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface UpdateDatabaseMetadataOrBuilder diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequest.java index 647cadb29..7c83ab867 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class UpdateDatabaseRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.UpdateDatabaseRequest) UpdateDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateDatabaseRequest.newBuilder() to construct. private UpdateDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int DATABASE_FIELD_NUMBER = 1; private com.google.firestore.admin.v1.Database database_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasDatabase() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -101,6 +104,7 @@ public com.google.firestore.admin.v1.Database getDatabase() { ? com.google.firestore.admin.v1.Database.getDefaultInstance() : database_; } + /** * * @@ -121,6 +125,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -136,6 +141,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -151,6 +157,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -343,6 +350,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -566,6 +574,7 @@ public Builder mergeFrom( com.google.firestore.admin.v1.Database.Builder, com.google.firestore.admin.v1.DatabaseOrBuilder> databaseBuilder_; + /** * * @@ -582,6 +591,7 @@ public Builder mergeFrom( public boolean hasDatabase() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -604,6 +614,7 @@ public com.google.firestore.admin.v1.Database getDatabase() { return databaseBuilder_.getMessage(); } } + /** * * @@ -628,6 +639,7 @@ public Builder setDatabase(com.google.firestore.admin.v1.Database value) { onChanged(); return this; } + /** * * @@ -649,6 +661,7 @@ public Builder setDatabase(com.google.firestore.admin.v1.Database.Builder builde onChanged(); return this; } + /** * * @@ -678,6 +691,7 @@ public Builder mergeDatabase(com.google.firestore.admin.v1.Database value) { } return this; } + /** * * @@ -699,6 +713,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -715,6 +730,7 @@ public com.google.firestore.admin.v1.Database.Builder getDatabaseBuilder() { onChanged(); return getDatabaseFieldBuilder().getBuilder(); } + /** * * @@ -735,6 +751,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { : database_; } } + /** * * @@ -769,6 +786,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -783,6 +801,7 @@ public com.google.firestore.admin.v1.DatabaseOrBuilder getDatabaseOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -803,6 +822,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -825,6 +845,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -844,6 +865,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -871,6 +893,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -890,6 +913,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -904,6 +928,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -922,6 +947,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequestOrBuilder.java index 6d1d29ba8..d3d5186b5 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateDatabaseRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface UpdateDatabaseRequestOrBuilder @@ -38,6 +38,7 @@ public interface UpdateDatabaseRequestOrBuilder * @return Whether the database field is set. */ boolean hasDatabase(); + /** * * @@ -52,6 +53,7 @@ public interface UpdateDatabaseRequestOrBuilder * @return The database. */ com.google.firestore.admin.v1.Database getDatabase(); + /** * * @@ -77,6 +79,7 @@ public interface UpdateDatabaseRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -89,6 +92,7 @@ public interface UpdateDatabaseRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java index ca68a9eec..2fdd0dbb1 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -34,6 +34,7 @@ public final class UpdateFieldRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.UpdateFieldRequest) UpdateFieldRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateFieldRequest.newBuilder() to construct. private UpdateFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int FIELD_FIELD_NUMBER = 1; private com.google.firestore.admin.v1.Field field_; + /** * * @@ -81,6 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -97,6 +100,7 @@ public boolean hasField() { public com.google.firestore.admin.v1.Field getField() { return field_ == null ? com.google.firestore.admin.v1.Field.getDefaultInstance() : field_; } + /** * * @@ -114,6 +118,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -130,6 +135,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -146,6 +152,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -339,6 +346,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -562,6 +570,7 @@ public Builder mergeFrom( com.google.firestore.admin.v1.Field.Builder, com.google.firestore.admin.v1.FieldOrBuilder> fieldBuilder_; + /** * * @@ -577,6 +586,7 @@ public Builder mergeFrom( public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -596,6 +606,7 @@ public com.google.firestore.admin.v1.Field getField() { return fieldBuilder_.getMessage(); } } + /** * * @@ -619,6 +630,7 @@ public Builder setField(com.google.firestore.admin.v1.Field value) { onChanged(); return this; } + /** * * @@ -639,6 +651,7 @@ public Builder setField(com.google.firestore.admin.v1.Field.Builder builderForVa onChanged(); return this; } + /** * * @@ -667,6 +680,7 @@ public Builder mergeField(com.google.firestore.admin.v1.Field value) { } return this; } + /** * * @@ -687,6 +701,7 @@ public Builder clearField() { onChanged(); return this; } + /** * * @@ -702,6 +717,7 @@ public com.google.firestore.admin.v1.Field.Builder getFieldBuilder() { onChanged(); return getFieldFieldBuilder().getBuilder(); } + /** * * @@ -719,6 +735,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { return field_ == null ? com.google.firestore.admin.v1.Field.getDefaultInstance() : field_; } } + /** * * @@ -752,6 +769,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -767,6 +785,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -788,6 +807,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -811,6 +831,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -831,6 +852,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -859,6 +881,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -879,6 +902,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -894,6 +918,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -913,6 +938,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.java index dc7d96c47..ce088fa06 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/firestore_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface UpdateFieldRequestOrBuilder @@ -37,6 +37,7 @@ public interface UpdateFieldRequestOrBuilder * @return Whether the field field is set. */ boolean hasField(); + /** * * @@ -50,6 +51,7 @@ public interface UpdateFieldRequestOrBuilder * @return The field. */ com.google.firestore.admin.v1.Field getField(); + /** * * @@ -75,6 +77,7 @@ public interface UpdateFieldRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -88,6 +91,7 @@ public interface UpdateFieldRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCreds.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCreds.java new file mode 100644 index 000000000..658eec3cd --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCreds.java @@ -0,0 +1,2841 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/user_creds.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * A Cloud Firestore User Creds.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.UserCreds} + */ +public final class UserCreds extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.UserCreds) + UserCredsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UserCreds.newBuilder() to construct. + private UserCreds(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserCreds() { + name_ = ""; + state_ = 0; + securePassword_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserCreds(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.UserCreds.class, + com.google.firestore.admin.v1.UserCreds.Builder.class); + } + + /** + * + * + *
+   * The state of the user creds (ENABLED or DISABLED).
+   * 
+ * + * Protobuf enum {@code google.firestore.admin.v1.UserCreds.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. Should not be used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The user creds are enabled.
+     * 
+ * + * ENABLED = 1; + */ + ENABLED(1), + /** + * + * + *
+     * The user creds are disabled.
+     * 
+ * + * DISABLED = 2; + */ + DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. Should not be used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The user creds are enabled.
+     * 
+ * + * ENABLED = 1; + */ + public static final int ENABLED_VALUE = 1; + + /** + * + * + *
+     * The user creds are disabled.
+     * 
+ * + * DISABLED = 2; + */ + public static final int DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ENABLED; + case 2: + return DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.UserCreds.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.UserCreds.State) + } + + public interface ResourceIdentityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.UserCreds.ResourceIdentity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Principal identifier string.
+     * See: https://cloud.google.com/iam/docs/principal-identifiers
+     * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The principal. + */ + java.lang.String getPrincipal(); + + /** + * + * + *
+     * Output only. Principal identifier string.
+     * See: https://cloud.google.com/iam/docs/principal-identifiers
+     * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for principal. + */ + com.google.protobuf.ByteString getPrincipalBytes(); + } + + /** + * + * + *
+   * Describes a Resource Identity principal.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.UserCreds.ResourceIdentity} + */ + public static final class ResourceIdentity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.UserCreds.ResourceIdentity) + ResourceIdentityOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ResourceIdentity.newBuilder() to construct. + private ResourceIdentity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceIdentity() { + principal_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceIdentity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.class, + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.Builder.class); + } + + public static final int PRINCIPAL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object principal_ = ""; + + /** + * + * + *
+     * Output only. Principal identifier string.
+     * See: https://cloud.google.com/iam/docs/principal-identifiers
+     * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The principal. + */ + @java.lang.Override + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. Principal identifier string.
+     * See: https://cloud.google.com/iam/docs/principal-identifiers
+     * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for principal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principal_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principal_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.UserCreds.ResourceIdentity)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.UserCreds.ResourceIdentity other = + (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) obj; + + if (!getPrincipal().equals(other.getPrincipal())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipal().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.admin.v1.UserCreds.ResourceIdentity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Describes a Resource Identity principal.
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.UserCreds.ResourceIdentity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.UserCreds.ResourceIdentity) + com.google.firestore.admin.v1.UserCreds.ResourceIdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.class, + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.UserCreds.ResourceIdentity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principal_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentity getDefaultInstanceForType() { + return com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentity build() { + com.google.firestore.admin.v1.UserCreds.ResourceIdentity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentity buildPartial() { + com.google.firestore.admin.v1.UserCreds.ResourceIdentity result = + new com.google.firestore.admin.v1.UserCreds.ResourceIdentity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.UserCreds.ResourceIdentity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.principal_ = principal_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.UserCreds.ResourceIdentity) { + return mergeFrom((com.google.firestore.admin.v1.UserCreds.ResourceIdentity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.UserCreds.ResourceIdentity other) { + if (other == com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance()) + return this; + if (!other.getPrincipal().isEmpty()) { + principal_ = other.principal_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + principal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object principal_ = ""; + + /** + * + * + *
+       * Output only. Principal identifier string.
+       * See: https://cloud.google.com/iam/docs/principal-identifiers
+       * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The principal. + */ + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. Principal identifier string.
+       * See: https://cloud.google.com/iam/docs/principal-identifiers
+       * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for principal. + */ + public com.google.protobuf.ByteString getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. Principal identifier string.
+       * See: https://cloud.google.com/iam/docs/principal-identifiers
+       * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principal_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Principal identifier string.
+       * See: https://cloud.google.com/iam/docs/principal-identifiers
+       * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPrincipal() { + principal_ = getDefaultInstance().getPrincipal(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Principal identifier string.
+       * See: https://cloud.google.com/iam/docs/principal-identifiers
+       * 
+ * + * string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipalBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principal_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.UserCreds.ResourceIdentity) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.UserCreds.ResourceIdentity) + private static final com.google.firestore.admin.v1.UserCreds.ResourceIdentity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.UserCreds.ResourceIdentity(); + } + + public static com.google.firestore.admin.v1.UserCreds.ResourceIdentity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceIdentity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int userCredsIdentityCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object userCredsIdentity_; + + public enum UserCredsIdentityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RESOURCE_IDENTITY(6), + USERCREDSIDENTITY_NOT_SET(0); + private final int value; + + private UserCredsIdentityCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserCredsIdentityCase valueOf(int value) { + return forNumber(value); + } + + public static UserCredsIdentityCase forNumber(int value) { + switch (value) { + case 6: + return RESOURCE_IDENTITY; + case 0: + return USERCREDSIDENTITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UserCredsIdentityCase getUserCredsIdentityCase() { + return UserCredsIdentityCase.forNumber(userCredsIdentityCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the UserCreds.
+   * Format:
+   * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the UserCreds.
+   * Format:
+   * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the user creds were created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the user creds were created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the user creds were created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time the user creds were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the user creds were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time the user creds were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + + /** + * + * + *
+   * Output only. Whether the user creds are enabled or disabled. Defaults to
+   * ENABLED on creation.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. Whether the user creds are enabled or disabled. Defaults to
+   * ENABLED on creation.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.State getState() { + com.google.firestore.admin.v1.UserCreds.State result = + com.google.firestore.admin.v1.UserCreds.State.forNumber(state_); + return result == null ? com.google.firestore.admin.v1.UserCreds.State.UNRECOGNIZED : result; + } + + public static final int SECURE_PASSWORD_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object securePassword_ = ""; + + /** + * + * + *
+   * Output only. The plaintext server-generated password for the user creds.
+   * Only populated in responses for CreateUserCreds and ResetUserPassword.
+   * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The securePassword. + */ + @java.lang.Override + public java.lang.String getSecurePassword() { + java.lang.Object ref = securePassword_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + securePassword_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The plaintext server-generated password for the user creds.
+   * Only populated in responses for CreateUserCreds and ResetUserPassword.
+   * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for securePassword. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecurePasswordBytes() { + java.lang.Object ref = securePassword_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + securePassword_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_IDENTITY_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Resource Identity descriptor.
+   * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * + * @return Whether the resourceIdentity field is set. + */ + @java.lang.Override + public boolean hasResourceIdentity() { + return userCredsIdentityCase_ == 6; + } + + /** + * + * + *
+   * Resource Identity descriptor.
+   * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * + * @return The resourceIdentity. + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentity getResourceIdentity() { + if (userCredsIdentityCase_ == 6) { + return (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_; + } + return com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance(); + } + + /** + * + * + *
+   * Resource Identity descriptor.
+   * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentityOrBuilder + getResourceIdentityOrBuilder() { + if (userCredsIdentityCase_ == 6) { + return (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_; + } + return com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (state_ != com.google.firestore.admin.v1.UserCreds.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(securePassword_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, securePassword_); + } + if (userCredsIdentityCase_ == 6) { + output.writeMessage( + 6, (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (state_ != com.google.firestore.admin.v1.UserCreds.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(securePassword_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, securePassword_); + } + if (userCredsIdentityCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.admin.v1.UserCreds)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.UserCreds other = (com.google.firestore.admin.v1.UserCreds) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getSecurePassword().equals(other.getSecurePassword())) return false; + if (!getUserCredsIdentityCase().equals(other.getUserCredsIdentityCase())) return false; + switch (userCredsIdentityCase_) { + case 6: + if (!getResourceIdentity().equals(other.getResourceIdentity())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + SECURE_PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getSecurePassword().hashCode(); + switch (userCredsIdentityCase_) { + case 6: + hash = (37 * hash) + RESOURCE_IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getResourceIdentity().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UserCreds parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UserCreds parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.UserCreds prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A Cloud Firestore User Creds.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.UserCreds} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.UserCreds) + com.google.firestore.admin.v1.UserCredsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.UserCreds.class, + com.google.firestore.admin.v1.UserCreds.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.UserCreds.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + state_ = 0; + securePassword_ = ""; + if (resourceIdentityBuilder_ != null) { + resourceIdentityBuilder_.clear(); + } + userCredsIdentityCase_ = 0; + userCredsIdentity_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.UserCredsProto + .internal_static_google_firestore_admin_v1_UserCreds_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds getDefaultInstanceForType() { + return com.google.firestore.admin.v1.UserCreds.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds build() { + com.google.firestore.admin.v1.UserCreds result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds buildPartial() { + com.google.firestore.admin.v1.UserCreds result = + new com.google.firestore.admin.v1.UserCreds(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.UserCreds result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.securePassword_ = securePassword_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.firestore.admin.v1.UserCreds result) { + result.userCredsIdentityCase_ = userCredsIdentityCase_; + result.userCredsIdentity_ = this.userCredsIdentity_; + if (userCredsIdentityCase_ == 6 && resourceIdentityBuilder_ != null) { + result.userCredsIdentity_ = resourceIdentityBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.UserCreds) { + return mergeFrom((com.google.firestore.admin.v1.UserCreds) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.UserCreds other) { + if (other == com.google.firestore.admin.v1.UserCreds.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getSecurePassword().isEmpty()) { + securePassword_ = other.securePassword_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getUserCredsIdentityCase()) { + case RESOURCE_IDENTITY: + { + mergeResourceIdentity(other.getResourceIdentity()); + break; + } + case USERCREDSIDENTITY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + securePassword_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getResourceIdentityFieldBuilder().getBuilder(), extensionRegistry); + userCredsIdentityCase_ = 6; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int userCredsIdentityCase_ = 0; + private java.lang.Object userCredsIdentity_; + + public UserCredsIdentityCase getUserCredsIdentityCase() { + return UserCredsIdentityCase.forNumber(userCredsIdentityCase_); + } + + public Builder clearUserCredsIdentity() { + userCredsIdentityCase_ = 0; + userCredsIdentity_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the UserCreds.
+     * Format:
+     * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the UserCreds.
+     * Format:
+     * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the UserCreds.
+     * Format:
+     * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the UserCreds.
+     * Format:
+     * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the UserCreds.
+     * Format:
+     * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the user creds were created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time the user creds were last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. Whether the user creds are enabled or disabled. Defaults to
+     * ENABLED on creation.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. Whether the user creds are enabled or disabled. Defaults to
+     * ENABLED on creation.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Whether the user creds are enabled or disabled. Defaults to
+     * ENABLED on creation.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.State getState() { + com.google.firestore.admin.v1.UserCreds.State result = + com.google.firestore.admin.v1.UserCreds.State.forNumber(state_); + return result == null ? com.google.firestore.admin.v1.UserCreds.State.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Output only. Whether the user creds are enabled or disabled. Defaults to
+     * ENABLED on creation.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.firestore.admin.v1.UserCreds.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Whether the user creds are enabled or disabled. Defaults to
+     * ENABLED on creation.
+     * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object securePassword_ = ""; + + /** + * + * + *
+     * Output only. The plaintext server-generated password for the user creds.
+     * Only populated in responses for CreateUserCreds and ResetUserPassword.
+     * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The securePassword. + */ + public java.lang.String getSecurePassword() { + java.lang.Object ref = securePassword_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + securePassword_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The plaintext server-generated password for the user creds.
+     * Only populated in responses for CreateUserCreds and ResetUserPassword.
+     * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for securePassword. + */ + public com.google.protobuf.ByteString getSecurePasswordBytes() { + java.lang.Object ref = securePassword_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + securePassword_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The plaintext server-generated password for the user creds.
+     * Only populated in responses for CreateUserCreds and ResetUserPassword.
+     * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The securePassword to set. + * @return This builder for chaining. + */ + public Builder setSecurePassword(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + securePassword_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The plaintext server-generated password for the user creds.
+     * Only populated in responses for CreateUserCreds and ResetUserPassword.
+     * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSecurePassword() { + securePassword_ = getDefaultInstance().getSecurePassword(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The plaintext server-generated password for the user creds.
+     * Only populated in responses for CreateUserCreds and ResetUserPassword.
+     * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for securePassword to set. + * @return This builder for chaining. + */ + public Builder setSecurePasswordBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + securePassword_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds.ResourceIdentity, + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.Builder, + com.google.firestore.admin.v1.UserCreds.ResourceIdentityOrBuilder> + resourceIdentityBuilder_; + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * + * @return Whether the resourceIdentity field is set. + */ + @java.lang.Override + public boolean hasResourceIdentity() { + return userCredsIdentityCase_ == 6; + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * + * @return The resourceIdentity. + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentity getResourceIdentity() { + if (resourceIdentityBuilder_ == null) { + if (userCredsIdentityCase_ == 6) { + return (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_; + } + return com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance(); + } else { + if (userCredsIdentityCase_ == 6) { + return resourceIdentityBuilder_.getMessage(); + } + return com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + public Builder setResourceIdentity( + com.google.firestore.admin.v1.UserCreds.ResourceIdentity value) { + if (resourceIdentityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userCredsIdentity_ = value; + onChanged(); + } else { + resourceIdentityBuilder_.setMessage(value); + } + userCredsIdentityCase_ = 6; + return this; + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + public Builder setResourceIdentity( + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.Builder builderForValue) { + if (resourceIdentityBuilder_ == null) { + userCredsIdentity_ = builderForValue.build(); + onChanged(); + } else { + resourceIdentityBuilder_.setMessage(builderForValue.build()); + } + userCredsIdentityCase_ = 6; + return this; + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + public Builder mergeResourceIdentity( + com.google.firestore.admin.v1.UserCreds.ResourceIdentity value) { + if (resourceIdentityBuilder_ == null) { + if (userCredsIdentityCase_ == 6 + && userCredsIdentity_ + != com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance()) { + userCredsIdentity_ = + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.newBuilder( + (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_) + .mergeFrom(value) + .buildPartial(); + } else { + userCredsIdentity_ = value; + } + onChanged(); + } else { + if (userCredsIdentityCase_ == 6) { + resourceIdentityBuilder_.mergeFrom(value); + } else { + resourceIdentityBuilder_.setMessage(value); + } + } + userCredsIdentityCase_ = 6; + return this; + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + public Builder clearResourceIdentity() { + if (resourceIdentityBuilder_ == null) { + if (userCredsIdentityCase_ == 6) { + userCredsIdentityCase_ = 0; + userCredsIdentity_ = null; + onChanged(); + } + } else { + if (userCredsIdentityCase_ == 6) { + userCredsIdentityCase_ = 0; + userCredsIdentity_ = null; + } + resourceIdentityBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + public com.google.firestore.admin.v1.UserCreds.ResourceIdentity.Builder + getResourceIdentityBuilder() { + return getResourceIdentityFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds.ResourceIdentityOrBuilder + getResourceIdentityOrBuilder() { + if ((userCredsIdentityCase_ == 6) && (resourceIdentityBuilder_ != null)) { + return resourceIdentityBuilder_.getMessageOrBuilder(); + } else { + if (userCredsIdentityCase_ == 6) { + return (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_; + } + return com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Resource Identity descriptor.
+     * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds.ResourceIdentity, + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.Builder, + com.google.firestore.admin.v1.UserCreds.ResourceIdentityOrBuilder> + getResourceIdentityFieldBuilder() { + if (resourceIdentityBuilder_ == null) { + if (!(userCredsIdentityCase_ == 6)) { + userCredsIdentity_ = + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.getDefaultInstance(); + } + resourceIdentityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.UserCreds.ResourceIdentity, + com.google.firestore.admin.v1.UserCreds.ResourceIdentity.Builder, + com.google.firestore.admin.v1.UserCreds.ResourceIdentityOrBuilder>( + (com.google.firestore.admin.v1.UserCreds.ResourceIdentity) userCredsIdentity_, + getParentForChildren(), + isClean()); + userCredsIdentity_ = null; + } + userCredsIdentityCase_ = 6; + onChanged(); + return resourceIdentityBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.UserCreds) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.UserCreds) + private static final com.google.firestore.admin.v1.UserCreds DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.UserCreds(); + } + + public static com.google.firestore.admin.v1.UserCreds getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserCreds parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UserCreds getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsName.java new file mode 100644 index 000000000..c0fd50a0e --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsName.java @@ -0,0 +1,223 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.firestore.admin.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class UserCredsName implements ResourceName { + private static final PathTemplate PROJECT_DATABASE_USER_CREDS = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/databases/{database}/userCreds/{user_creds}"); + private volatile Map fieldValuesMap; + private final String project; + private final String database; + private final String userCreds; + + @Deprecated + protected UserCredsName() { + project = null; + database = null; + userCreds = null; + } + + private UserCredsName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + database = Preconditions.checkNotNull(builder.getDatabase()); + userCreds = Preconditions.checkNotNull(builder.getUserCreds()); + } + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getUserCreds() { + return userCreds; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static UserCredsName of(String project, String database, String userCreds) { + return newBuilder().setProject(project).setDatabase(database).setUserCreds(userCreds).build(); + } + + public static String format(String project, String database, String userCreds) { + return newBuilder() + .setProject(project) + .setDatabase(database) + .setUserCreds(userCreds) + .build() + .toString(); + } + + public static UserCredsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_DATABASE_USER_CREDS.validatedMatch( + formattedString, "UserCredsName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("database"), matchMap.get("user_creds")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (UserCredsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_DATABASE_USER_CREDS.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (database != null) { + fieldMapBuilder.put("database", database); + } + if (userCreds != null) { + fieldMapBuilder.put("user_creds", userCreds); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_DATABASE_USER_CREDS.instantiate( + "project", project, "database", database, "user_creds", userCreds); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + UserCredsName that = ((UserCredsName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.database, that.database) + && Objects.equals(this.userCreds, that.userCreds); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(database); + h *= 1000003; + h ^= Objects.hashCode(userCreds); + return h; + } + + /** Builder for projects/{project}/databases/{database}/userCreds/{user_creds}. */ + public static class Builder { + private String project; + private String database; + private String userCreds; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getUserCreds() { + return userCreds; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDatabase(String database) { + this.database = database; + return this; + } + + public Builder setUserCreds(String userCreds) { + this.userCreds = userCreds; + return this; + } + + private Builder(UserCredsName userCredsName) { + this.project = userCredsName.project; + this.database = userCredsName.database; + this.userCreds = userCredsName.userCreds; + } + + public UserCredsName build() { + return new UserCredsName(this); + } + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsOrBuilder.java new file mode 100644 index 000000000..2e771a791 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsOrBuilder.java @@ -0,0 +1,235 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/user_creds.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public interface UserCredsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.UserCreds) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the UserCreds.
+   * Format:
+   * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the UserCreds.
+   * Format:
+   * `projects/{project}/databases/{database}/userCreds/{user_creds}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the user creds were created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the user creds were created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the user creds were created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the user creds were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time the user creds were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time the user creds were last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Whether the user creds are enabled or disabled. Defaults to
+   * ENABLED on creation.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. Whether the user creds are enabled or disabled. Defaults to
+   * ENABLED on creation.
+   * 
+ * + * + * .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.firestore.admin.v1.UserCreds.State getState(); + + /** + * + * + *
+   * Output only. The plaintext server-generated password for the user creds.
+   * Only populated in responses for CreateUserCreds and ResetUserPassword.
+   * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The securePassword. + */ + java.lang.String getSecurePassword(); + + /** + * + * + *
+   * Output only. The plaintext server-generated password for the user creds.
+   * Only populated in responses for CreateUserCreds and ResetUserPassword.
+   * 
+ * + * string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for securePassword. + */ + com.google.protobuf.ByteString getSecurePasswordBytes(); + + /** + * + * + *
+   * Resource Identity descriptor.
+   * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * + * @return Whether the resourceIdentity field is set. + */ + boolean hasResourceIdentity(); + + /** + * + * + *
+   * Resource Identity descriptor.
+   * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * + * @return The resourceIdentity. + */ + com.google.firestore.admin.v1.UserCreds.ResourceIdentity getResourceIdentity(); + + /** + * + * + *
+   * Resource Identity descriptor.
+   * 
+ * + * .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + */ + com.google.firestore.admin.v1.UserCreds.ResourceIdentityOrBuilder getResourceIdentityOrBuilder(); + + com.google.firestore.admin.v1.UserCreds.UserCredsIdentityCase getUserCredsIdentityCase(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsProto.java new file mode 100644 index 000000000..300bab916 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UserCredsProto.java @@ -0,0 +1,116 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/user_creds.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.admin.v1; + +public final class UserCredsProto { + private UserCredsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_UserCreds_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_UserCreds_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/firestore/admin/v1/user_creds.p" + + "roto\022\031google.firestore.admin.v1\032\037google/" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032\037google/protobuf/timestamp.p" + + "roto\"\267\004\n\tUserCreds\022\021\n\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\022>\n\005state\030\004 \001(\016" + + "2*.google.firestore.admin.v1.UserCreds.S" + + "tateB\003\340A\003\022\034\n\017secure_password\030\005 \001(\tB\003\340A\003\022" + + "R\n\021resource_identity\030\006 \001(\01325.google.fire" + + "store.admin.v1.UserCreds.ResourceIdentit" + + "yH\000\032*\n\020ResourceIdentity\022\026\n\tprincipal\030\001 \001" + + "(\tB\003\340A\003\"9\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + + "\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002:}\352Az\n\"firesto" + + "re.googleapis.com/UserCreds\022>projects/{p" + + "roject}/databases/{database}/userCreds/{" + + "user_creds}*\tuserCreds2\tuserCredsB\023\n\021Use" + + "rCredsIdentityB\335\001\n\035com.google.firestore." + + "admin.v1B\016UserCredsProtoP\001Z9cloud.google" + + ".com/go/firestore/apiv1/admin/adminpb;ad" + + "minpb\242\002\004GCFS\252\002\037Google.Cloud.Firestore.Ad" + + "min.V1\312\002\037Google\\Cloud\\Firestore\\Admin\\V1" + + "\352\002#Google::Cloud::Firestore::Admin::V1b\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_firestore_admin_v1_UserCreds_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_admin_v1_UserCreds_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_UserCreds_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "State", + "SecurePassword", + "ResourceIdentity", + "UserCredsIdentity", + }); + internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_descriptor = + internal_static_google_firestore_admin_v1_UserCreds_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_UserCreds_ResourceIdentity_descriptor, + new java.lang.String[] { + "Principal", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrence.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrence.java index 256e57f0c..cdc1b0c4f 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrence.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrence.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/schedule.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; /** @@ -35,6 +35,7 @@ public final class WeeklyRecurrence extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.WeeklyRecurrence) WeeklyRecurrenceOrBuilder { private static final long serialVersionUID = 0L; + // Use WeeklyRecurrence.newBuilder() to construct. private WeeklyRecurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int DAY_FIELD_NUMBER = 2; private int day_ = 0; + /** * * @@ -84,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public int getDayValue() { return day_; } + /** * * @@ -262,6 +265,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -445,6 +449,7 @@ public Builder mergeFrom( private int bitField0_; private int day_ = 0; + /** * * @@ -462,6 +467,7 @@ public Builder mergeFrom( public int getDayValue() { return day_; } + /** * * @@ -482,6 +488,7 @@ public Builder setDayValue(int value) { onChanged(); return this; } + /** * * @@ -500,6 +507,7 @@ public com.google.type.DayOfWeek getDay() { com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(day_); return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; } + /** * * @@ -523,6 +531,7 @@ public Builder setDay(com.google.type.DayOfWeek value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrenceOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrenceOrBuilder.java index 6c265b99d..a6045fd20 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrenceOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/WeeklyRecurrenceOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/admin/v1/schedule.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.admin.v1; public interface WeeklyRecurrenceOrBuilder @@ -38,6 +38,7 @@ public interface WeeklyRecurrenceOrBuilder * @return The enum numeric value on the wire for day. */ int getDayValue(); + /** * * diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto index 45f3adc8e..bed41ff66 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto @@ -1,4 +1,4 @@ -// 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/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/database.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/database.proto index 67c8371df..3537e4a3b 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/database.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/database.proto @@ -1,4 +1,4 @@ -// 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. @@ -29,6 +29,10 @@ option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; option ruby_package = "Google::Cloud::Firestore::Admin::V1"; +option (google.api.resource_definition) = { + type: "firestore.googleapis.com/Operation" + pattern: "projects/{project}/databases/{database}/operations/{operation}" +}; // A Cloud Firestore Database. message Database { @@ -44,7 +48,7 @@ message Database { // // Mode changes are only allowed if the database is empty. enum DatabaseType { - // The default value. This value is used if the database type is omitted. + // Not used. DATABASE_TYPE_UNSPECIFIED = 0; // Firestore Native Mode @@ -128,6 +132,115 @@ message Database { DELETE_PROTECTION_ENABLED = 2; } + // The CMEK (Customer Managed Encryption Key) configuration for a Firestore + // database. If not present, the database is secured by the default Google + // encryption key. + message CmekConfig { + // Required. Only keys in the same location as this database are allowed to + // be used for encryption. + // + // For Firestore's nam5 multi-region, this corresponds to Cloud KMS + // multi-region us. For Firestore's eur3 multi-region, this corresponds to + // Cloud KMS multi-region europe. See + // https://cloud.google.com/kms/docs/locations. + // + // The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Currently in-use [KMS key + // versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + // During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + // there can be multiple in-use key versions. + // + // The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + repeated string active_key_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Information about the provenance of this database. + message SourceInfo { + // Information about a backup that was used to restore a database. + message BackupSource { + // The resource name of the backup that was used to restore this + // database. Format: + // `projects/{project}/locations/{location}/backups/{backup}`. + string backup = 1 [(google.api.resource_reference) = { + type: "firestore.googleapis.com/Backup" + }]; + } + + // The source from which this database is derived. + oneof source { + // If set, this database was restored from the specified backup (or a + // snapshot thereof). + BackupSource backup = 1; + } + + // The associated long-running operation. This field may not be set after + // the operation has completed. Format: + // `projects/{project}/databases/{database}/operations/{operation}`. + string operation = 3 [(google.api.resource_reference) = { + type: "firestore.googleapis.com/Operation" + }]; + } + + // Encryption configuration for a new database being created from another + // source. + // + // The source could be a [Backup][google.firestore.admin.v1.Backup] . + message EncryptionConfig { + // The configuration options for using Google default encryption. + message GoogleDefaultEncryptionOptions {} + + // The configuration options for using the same encryption method as the + // source. + message SourceEncryptionOptions {} + + // The configuration options for using CMEK (Customer Managed Encryption + // Key) encryption. + message CustomerManagedEncryptionOptions { + // Required. Only keys in the same location as the database are allowed to + // be used for encryption. + // + // For Firestore's nam5 multi-region, this corresponds to Cloud KMS + // multi-region us. For Firestore's eur3 multi-region, this corresponds to + // Cloud KMS multi-region europe. See + // https://cloud.google.com/kms/docs/locations. + // + // The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The method for encrypting the database. + oneof encryption_type { + // Use Google default encryption. + GoogleDefaultEncryptionOptions google_default_encryption = 1; + + // The database will use the same encryption configuration as the source. + SourceEncryptionOptions use_source_encryption = 2; + + // Use Customer Managed Encryption Keys (CMEK) for encryption. + CustomerManagedEncryptionOptions customer_managed_encryption = 3; + } + } + + // The edition of the database. + enum DatabaseEdition { + // Not used. + DATABASE_EDITION_UNSPECIFIED = 0; + + // Standard edition. + // + // This is the default setting if not specified. + STANDARD = 1; + + // Enterprise edition. + ENTERPRISE = 2; + } + // The resource name of the Database. // Format: `projects/{project}/databases/{database}` string name = 1; @@ -146,6 +259,11 @@ message Database { google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The timestamp at which this database was deleted. Only set if + // the database has been deleted. + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // The location of the database. Available locations are listed at // https://cloud.google.com/firestore/docs/locations. string location_id = 9; @@ -189,8 +307,8 @@ message Database { AppEngineIntegrationMode app_engine_integration_mode = 19; // Output only. The key_prefix for this database. This key_prefix is used, in - // combination with the project id ("~") to construct - // the application id that is returned from the Cloud Datastore APIs in Google + // combination with the project ID ("~") to construct + // the application ID that is returned from the Cloud Datastore APIs in Google // App Engine first generation runtimes. // // This value may be empty in which case the appid to use for URL-encoded keys @@ -200,8 +318,45 @@ message Database { // State of delete protection for the database. DeleteProtectionState delete_protection_state = 22; + // Optional. Presence indicates CMEK is enabled for this database. + CmekConfig cmek_config = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The database resource's prior database ID. This field is only + // populated for deleted databases. + string previous_id = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information about the provenance of this database. + SourceInfo source_info = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + map tags = 29 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; + + // Output only. Background: Free tier is the ability of a Firestore database + // to use a small amount of resources every day without being charged. Once + // usage exceeds the free tier limit further usage is charged. + // + // Whether this database can make use of the free tier. Only one database + // per project can be eligible for the free tier. + // + // The first (or next) database that is created in a project without a free + // tier database will be marked as eligible for the free tier. Databases that + // are created while there is a free tier database will not be eligible for + // the free tier. + optional bool free_tier = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This checksum is computed by the server based on the value of other // fields, and may be sent on update and delete requests to ensure the // client has an up-to-date value before proceeding. string etag = 99; + + // Immutable. The edition of the database. + DatabaseEdition database_edition = 28 + [(google.api.field_behavior) = IMMUTABLE]; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto index eefee763c..d899bdb5c 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto @@ -1,4 +1,4 @@ -// 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. @@ -32,7 +32,7 @@ option ruby_package = "Google::Cloud::Firestore::Admin::V1"; // Represents a single field in the database. // // Fields are grouped by their "Collection Group", which represent all -// collections in the database with the same id. +// collections in the database with the same ID. message Field { option (google.api.resource) = { type: "firestore.googleapis.com/Field" diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto index dd95c2ce7..1d4efbdde 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto @@ -1,4 +1,4 @@ -// 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. @@ -20,12 +20,15 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/api/routing.proto"; import "google/firestore/admin/v1/backup.proto"; import "google/firestore/admin/v1/database.proto"; import "google/firestore/admin/v1/field.proto"; import "google/firestore/admin/v1/index.proto"; import "google/firestore/admin/v1/operation.proto"; import "google/firestore/admin/v1/schedule.proto"; +import "google/firestore/admin/v1/snapshot.proto"; +import "google/firestore/admin/v1/user_creds.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -295,6 +298,68 @@ service FirestoreAdmin { }; } + // Create a user creds. + rpc CreateUserCreds(CreateUserCredsRequest) returns (UserCreds) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*}/userCreds" + body: "user_creds" + }; + option (google.api.method_signature) = "parent,user_creds,user_creds_id"; + } + + // Gets a user creds resource. Note that the returned resource does not + // contain the secret value itself. + rpc GetUserCreds(GetUserCredsRequest) returns (UserCreds) { + option (google.api.http) = { + get: "/v1/{name=projects/*/databases/*/userCreds/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List all user creds in the database. Note that the returned resource + // does not contain the secret value itself. + rpc ListUserCreds(ListUserCredsRequest) returns (ListUserCredsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/databases/*}/userCreds" + }; + option (google.api.method_signature) = "parent"; + } + + // Enables a user creds. No-op if the user creds are already enabled. + rpc EnableUserCreds(EnableUserCredsRequest) returns (UserCreds) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*/userCreds/*}:enable" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Disables a user creds. No-op if the user creds are already disabled. + rpc DisableUserCreds(DisableUserCredsRequest) returns (UserCreds) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*/userCreds/*}:disable" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Resets the password of a user creds. + rpc ResetUserPassword(ResetUserPasswordRequest) returns (UserCreds) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a user creds. + rpc DeleteUserCreds(DeleteUserCredsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/databases/*/userCreds/*}" + }; + option (google.api.method_signature) = "name"; + } + // Gets information about a backup. rpc GetBackup(GetBackupRequest) returns (Backup) { option (google.api.http) = { @@ -395,6 +460,45 @@ service FirestoreAdmin { }; option (google.api.method_signature) = "name"; } + + // 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. + rpc CloneDatabase(CloneDatabaseRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/databases:clone" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "pitr_snapshot.database" + path_template: "projects/{project_id=*}/**" + } + routing_parameters { + field: "pitr_snapshot.database" + path_template: "projects/*/databases/{database_id=*}/**" + } + }; + option (google.longrunning.operation_info) = { + response_type: "Database" + metadata_type: "CloneDatabaseMetadata" + }; + } } // A request to list the Firestore Databases in all locations for a project. @@ -434,7 +538,7 @@ message CreateDatabaseRequest { // 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. string database_id = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -505,6 +609,115 @@ message DeleteDatabaseRequest { // Metadata related to the delete database operation. message DeleteDatabaseMetadata {} +// The request for +// [FirestoreAdmin.CreateUserCreds][google.firestore.admin.v1.FirestoreAdmin.CreateUserCreds]. +message CreateUserCredsRequest { + // Required. A parent name of the form + // `projects/{project_id}/databases/{database_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "firestore.googleapis.com/UserCreds" + } + ]; + + // Required. The user creds to create. + UserCreds user_creds = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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}/. + string user_creds_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for +// [FirestoreAdmin.GetUserCreds][google.firestore.admin.v1.FirestoreAdmin.GetUserCreds]. +message GetUserCredsRequest { + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/UserCreds" + } + ]; +} + +// The request for +// [FirestoreAdmin.ListUserCreds][google.firestore.admin.v1.FirestoreAdmin.ListUserCreds]. +message ListUserCredsRequest { + // Required. A parent database name of the form + // `projects/{project_id}/databases/{database_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "firestore.googleapis.com/UserCreds" + } + ]; +} + +// The response for +// [FirestoreAdmin.ListUserCreds][google.firestore.admin.v1.FirestoreAdmin.ListUserCreds]. +message ListUserCredsResponse { + // The user creds for the database. + repeated UserCreds user_creds = 1; +} + +// The request for +// [FirestoreAdmin.EnableUserCreds][google.firestore.admin.v1.FirestoreAdmin.EnableUserCreds]. +message EnableUserCredsRequest { + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/UserCreds" + } + ]; +} + +// The request for +// [FirestoreAdmin.DisableUserCreds][google.firestore.admin.v1.FirestoreAdmin.DisableUserCreds]. +message DisableUserCredsRequest { + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/UserCreds" + } + ]; +} + +// The request for +// [FirestoreAdmin.ResetUserPassword][google.firestore.admin.v1.FirestoreAdmin.ResetUserPassword]. +message ResetUserPasswordRequest { + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/UserCreds" + } + ]; +} + +// The request for +// [FirestoreAdmin.DeleteUserCreds][google.firestore.admin.v1.FirestoreAdmin.DeleteUserCreds]. +message DeleteUserCredsRequest { + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/UserCreds" + } + ]; +} + // The request for // [FirestoreAdmin.CreateBackupSchedule][google.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule]. message CreateBackupScheduleRequest { @@ -730,8 +943,8 @@ message ExportDocumentsRequest { } ]; - // Which collection ids to export. Unspecified means all collections. Each - // collection id in this list must be unique. + // Which collection IDs to export. Unspecified means all collections. Each + // collection ID in this list must be unique. repeated string collection_ids = 2; // The output URI. Currently only supports Google Cloud Storage URIs of the @@ -774,8 +987,8 @@ message ImportDocumentsRequest { } ]; - // Which collection ids to import. Unspecified means all collections included - // in the import. Each collection id in this list must be unique. + // Which collection IDs to import. Unspecified means all collections included + // in the import. Each collection ID in this list must be unique. repeated string collection_ids = 2; // Location of the exported files. @@ -866,6 +1079,20 @@ message ListBackupsRequest { type: "firestore.googleapis.com/Location" } ]; + + // An expression that filters the list of returned backups. + // + // A filter expression consists of a field name, a comparison operator, and a + // value for filtering. + // The value must be a string, a number, or a boolean. The comparison operator + // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + // Colon `:` is the contains operator. Filter rules are not case sensitive. + // + // The following fields in the [Backup][google.firestore.admin.v1.Backup] are + // eligible for filtering: + // + // * `database_uid` (supports `=` only) + string filter = 2; } // The response for @@ -898,7 +1125,7 @@ message DeleteBackupRequest { } // The request message for -// [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.RestoreDatabase]. +// [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase]. message RestoreDatabaseRequest { // Required. The project to restore the database in. Format is // `projects/{project_id}`. @@ -910,19 +1137,22 @@ message RestoreDatabaseRequest { ]; // Required. The ID to use for the database, which will become the final - // component of the database's resource name. This database id must not be + // component of the database's resource name. This database ID must not be // associated with an existing database. // // 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. string database_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Backup to restore from. Must be from the same project as the // parent. // + // The restored database will be created in the same location as the source + // backup. + // // Format is: `projects/{project_id}/locations/{location}/backups/{backup}` string backup = 3 [ (google.api.field_behavior) = REQUIRED, @@ -930,4 +1160,69 @@ message RestoreDatabaseRequest { type: "firestore.googleapis.com/Backup" } ]; + + // Optional. Encryption configuration for the restored database. + // + // If this field is not specified, the restored database will use + // the same encryption configuration as the backup, namely + // [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + Database.EncryptionConfig encryption_config = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Immutable. Tags to be bound to the restored database. + // + // The tags should be provided in the format of + // `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + map tags = 10 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The request message for +// [FirestoreAdmin.CloneDatabase][google.firestore.admin.v1.FirestoreAdmin.CloneDatabase]. +message CloneDatabaseRequest { + // Required. The project to clone the database in. Format is + // `projects/{project_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "firestore.googleapis.com/Database" + } + ]; + + // Required. The ID to use for the database, which will become the final + // component of the database's resource name. This database ID must not be + // associated with an existing database. + // + // 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. + string database_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specification of the PITR data to clone from. The source database + // must exist. + // + // The cloned database will be created in the same location as the source + // database. + PitrSnapshot pitr_snapshot = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Encryption configuration for the cloned database. + // + // If this field is not specified, the cloned database will use + // the same encryption configuration as the source database, namely + // [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + Database.EncryptionConfig encryption_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Immutable. Tags to be bound to the cloned database. + // + // The tags should be provided in the format of + // `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + map tags = 5 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto index f2a3cc373..5dd4dc9fb 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto @@ -1,4 +1,4 @@ -// 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. @@ -44,11 +44,11 @@ message Index { // Indexes with a collection query scope specified allow queries // against a collection that is the child of a specific document, specified - // at query time, and that has the collection id specified by the index. + // at query time, and that has the collection ID specified by the index. COLLECTION = 1; // Indexes with a collection group query scope specified allow queries - // against all collections that has the collection id specified by the + // against all collections that has the collection ID specified by the // index. COLLECTION_GROUP = 2; @@ -66,6 +66,9 @@ message Index { // The index can only be used by the Firestore in Datastore Mode query API. DATASTORE_MODE_API = 1; + + // The index can only be used by the MONGODB_COMPATIBLE_API. + MONGODB_COMPATIBLE_API = 2; } // A field in an index. @@ -162,6 +165,32 @@ message Index { NEEDS_REPAIR = 3; } + // The density configuration for the index. + enum Density { + // Unspecified. It will use database default setting. This value is input + // only. + DENSITY_UNSPECIFIED = 0; + + // In order for an index entry to be added, the document must + // contain all fields specified in the index. + // + // This is the only allowed value for indexes having ApiScope `ANY_API` and + // `DATASTORE_MODE_API`. + SPARSE_ALL = 1; + + // In order for an index entry to be added, the document must + // contain at least one of the fields specified in the index. + // Non-existent fields are treated as having a NULL value when generating + // index entries. + SPARSE_ANY = 2; + + // An index entry will be added regardless of whether the + // document contains any of the fields specified in the index. + // Non-existent fields are treated as having a NULL value when generating + // index entries. + DENSE = 3; + } + // Output only. A server defined name for this index. // The form of this name for composite indexes will be: // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` @@ -170,11 +199,11 @@ message Index { // Indexes with a collection query scope specified allow queries // against a collection that is the child of a specific document, specified at - // query time, and that has the same collection id. + // query time, and that has the same collection ID. // // Indexes with a collection group query scope specified allow queries against // all collections descended from a specific document, specified at query - // time, and that have the same collection id as this index. + // time, and that have the same collection ID as this index. QueryScope query_scope = 2; // The API scope supported by this index. @@ -195,4 +224,20 @@ message Index { // Output only. The serving state of the index. State state = 4; + + // Immutable. The density configuration of the index. + Density density = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. Whether the index is multikey. By default, the index is not + // multikey. For non-multikey indexes, none of the paths in the index + // definition reach or traverse an array, except via an explicit array index. + // For multikey indexes, at most one of the paths in the index definition + // reach or traverse an array, except via an explicit array index. Violations + // will result in errors. + // + // Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + bool multikey = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of shards for the index. + int32 shard_count = 8 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto index 4a1154f8c..1eaa5df33 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto @@ -1,4 +1,4 @@ -// 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/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto index 80b133764..6fa21489f 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto @@ -1,4 +1,4 @@ -// 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. @@ -18,6 +18,7 @@ package google.firestore.admin.v1; import "google/api/resource.proto"; import "google/firestore/admin/v1/index.proto"; +import "google/firestore/admin/v1/snapshot.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; @@ -146,13 +147,13 @@ message ExportDocumentsMetadata { // The progress, in bytes, of this operation. Progress progress_bytes = 5; - // Which collection ids are being exported. + // Which collection IDs are being exported. repeated string collection_ids = 6; // Where the documents are being exported to. string output_uri_prefix = 7; - // Which namespace ids are being exported. + // Which namespace IDs are being exported. repeated string namespace_ids = 8; // The timestamp that corresponds to the version of the database that is being @@ -181,13 +182,13 @@ message ImportDocumentsMetadata { // The progress, in bytes, of this operation. Progress progress_bytes = 5; - // Which collection ids are being imported. + // Which collection IDs are being imported. repeated string collection_ids = 6; // The location of the documents being imported. string input_uri_prefix = 7; - // Which namespace ids are being imported. + // Which namespace IDs are being imported. repeated string namespace_ids = 8; } @@ -211,10 +212,10 @@ message BulkDeleteDocumentsMetadata { // The progress, in bytes, of this operation. Progress progress_bytes = 5; - // The ids of the collection groups that are being deleted. + // The IDs of the collection groups that are being deleted. repeated string collection_ids = 6; - // Which namespace ids are being deleted. + // Which namespace IDs are being deleted. repeated string namespace_ids = 7; // The timestamp that corresponds to the version of the database that is being @@ -259,6 +260,30 @@ message RestoreDatabaseMetadata { Progress progress_percentage = 8; } +// Metadata for the [long-running operation][google.longrunning.Operation] from +// the [CloneDatabase][google.firestore.admin.v1.CloneDatabase] request. +message CloneDatabaseMetadata { + // The time the clone was started. + google.protobuf.Timestamp start_time = 1; + + // The time the clone finished, unset for ongoing clones. + google.protobuf.Timestamp end_time = 2; + + // The operation state of the clone. + OperationState operation_state = 3; + + // The name of the database being cloned to. + string database = 4 [(google.api.resource_reference) = { + type: "firestore.googleapis.com/Database" + }]; + + // The snapshot from which this database was cloned. + PitrSnapshot pitr_snapshot = 7; + + // How far along the clone is as an estimated percentage of remaining time. + Progress progress_percentage = 6; +} + // Describes the progress of the operation. // Unit of work is generic and must be interpreted based on where // [Progress][google.firestore.admin.v1.Progress] is used. diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/schedule.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/schedule.proto index 52200e8e5..0f1798247 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/schedule.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/schedule.proto @@ -1,4 +1,4 @@ -// 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. @@ -65,6 +65,8 @@ message BackupSchedule { // At what relative time in the future, compared to its creation time, // the backup should be deleted, e.g. keep backups for 7 days. + // + // The maximum supported retention period is 14 weeks. google.protobuf.Duration retention = 6; // A oneof field to represent when backups will be taken. @@ -77,7 +79,7 @@ message BackupSchedule { } } -// Represents a recurring schedule that runs at a specific time every day. +// Represents a recurring schedule that runs every day. // // The time zone is UTC. message DailyRecurrence {} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/snapshot.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/snapshot.proto new file mode 100644 index 000000000..895bed4da --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/snapshot.proto @@ -0,0 +1,53 @@ +// 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. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.firestore.admin.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "PitrSnapshotProto"; +option java_package = "com.google.firestore.admin.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; +option ruby_package = "Google::Cloud::Firestore::Admin::V1"; + +// A consistent snapshot of a database at a specific point in time. +// A PITR (Point-in-time recovery) snapshot with previous versions of a +// database's data is available for every minute up to the associated database's +// data retention period. If the PITR feature is enabled, the retention period +// is 7 days; otherwise, it is one hour. +message PitrSnapshot { + // Required. The name of the database that this was a snapshot of. Format: + // `projects/{project}/databases/{database}`. + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/Database" + } + ]; + + // Output only. Public UUID of the database the snapshot was associated with. + bytes database_uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Snapshot time of the database. + google.protobuf.Timestamp snapshot_time = 3 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/user_creds.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/user_creds.proto new file mode 100644 index 000000000..ae4db3e46 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/user_creds.proto @@ -0,0 +1,86 @@ +// 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. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.firestore.admin.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "UserCredsProto"; +option java_package = "com.google.firestore.admin.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; +option ruby_package = "Google::Cloud::Firestore::Admin::V1"; + +// A Cloud Firestore User Creds. +message UserCreds { + option (google.api.resource) = { + type: "firestore.googleapis.com/UserCreds" + pattern: "projects/{project}/databases/{database}/userCreds/{user_creds}" + plural: "userCreds" + singular: "userCreds" + }; + + // The state of the user creds (ENABLED or DISABLED). + enum State { + // The default value. Should not be used. + STATE_UNSPECIFIED = 0; + + // The user creds are enabled. + ENABLED = 1; + + // The user creds are disabled. + DISABLED = 2; + } + + // Describes a Resource Identity principal. + message ResourceIdentity { + // Output only. Principal identifier string. + // See: https://cloud.google.com/iam/docs/principal-identifiers + string principal = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Identifier. The resource name of the UserCreds. + // Format: + // `projects/{project}/databases/{database}/userCreds/{user_creds}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The time the user creds were created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the user creds were last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the user creds are enabled or disabled. Defaults to + // ENABLED on creation. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The plaintext server-generated password for the user creds. + // Only populated in responses for CreateUserCreds and ResetUserPassword. + string secure_password = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Identity associated with this User Creds. + oneof UserCredsIdentity { + // Resource Identity descriptor. + ResourceIdentity resource_identity = 6; + } +} diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElement.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElement.java index 44cf1a28b..26e4e1337 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElement.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElement.java @@ -37,6 +37,7 @@ public final class BundleElement extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.bundle.BundleElement) BundleElementOrBuilder { private static final long serialVersionUID = 0L; + // Use BundleElement.newBuilder() to construct. private BundleElement(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -84,6 +85,7 @@ public enum ElementTypeCase private ElementTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -121,6 +123,7 @@ public ElementTypeCase getElementTypeCase() { } public static final int METADATA_FIELD_NUMBER = 1; + /** * .google.firestore.bundle.BundleMetadata metadata = 1; * @@ -130,6 +133,7 @@ public ElementTypeCase getElementTypeCase() { public boolean hasMetadata() { return elementTypeCase_ == 1; } + /** * .google.firestore.bundle.BundleMetadata metadata = 1; * @@ -142,6 +146,7 @@ public com.google.firestore.bundle.BundleMetadata getMetadata() { } return com.google.firestore.bundle.BundleMetadata.getDefaultInstance(); } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ @java.lang.Override public com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder() { @@ -152,6 +157,7 @@ public com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder( } public static final int NAMED_QUERY_FIELD_NUMBER = 2; + /** * .google.firestore.bundle.NamedQuery named_query = 2; * @@ -161,6 +167,7 @@ public com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder( public boolean hasNamedQuery() { return elementTypeCase_ == 2; } + /** * .google.firestore.bundle.NamedQuery named_query = 2; * @@ -173,6 +180,7 @@ public com.google.firestore.bundle.NamedQuery getNamedQuery() { } return com.google.firestore.bundle.NamedQuery.getDefaultInstance(); } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ @java.lang.Override public com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder() { @@ -183,6 +191,7 @@ public com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder() } public static final int DOCUMENT_METADATA_FIELD_NUMBER = 3; + /** * .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; * @@ -192,6 +201,7 @@ public com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder() public boolean hasDocumentMetadata() { return elementTypeCase_ == 3; } + /** * .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; * @@ -204,6 +214,7 @@ public com.google.firestore.bundle.BundledDocumentMetadata getDocumentMetadata() } return com.google.firestore.bundle.BundledDocumentMetadata.getDefaultInstance(); } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ @java.lang.Override public com.google.firestore.bundle.BundledDocumentMetadataOrBuilder @@ -215,6 +226,7 @@ public com.google.firestore.bundle.BundledDocumentMetadata getDocumentMetadata() } public static final int DOCUMENT_FIELD_NUMBER = 4; + /** * .google.firestore.v1.Document document = 4; * @@ -224,6 +236,7 @@ public com.google.firestore.bundle.BundledDocumentMetadata getDocumentMetadata() public boolean hasDocument() { return elementTypeCase_ == 4; } + /** * .google.firestore.v1.Document document = 4; * @@ -236,6 +249,7 @@ public com.google.firestore.v1.Document getDocument() { } return com.google.firestore.v1.Document.getDefaultInstance(); } + /** .google.firestore.v1.Document document = 4; */ @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { @@ -464,6 +478,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -737,6 +752,7 @@ public Builder clearElementType() { com.google.firestore.bundle.BundleMetadata.Builder, com.google.firestore.bundle.BundleMetadataOrBuilder> metadataBuilder_; + /** * .google.firestore.bundle.BundleMetadata metadata = 1; * @@ -746,6 +762,7 @@ public Builder clearElementType() { public boolean hasMetadata() { return elementTypeCase_ == 1; } + /** * .google.firestore.bundle.BundleMetadata metadata = 1; * @@ -765,6 +782,7 @@ public com.google.firestore.bundle.BundleMetadata getMetadata() { return com.google.firestore.bundle.BundleMetadata.getDefaultInstance(); } } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ public Builder setMetadata(com.google.firestore.bundle.BundleMetadata value) { if (metadataBuilder_ == null) { @@ -779,6 +797,7 @@ public Builder setMetadata(com.google.firestore.bundle.BundleMetadata value) { elementTypeCase_ = 1; return this; } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ public Builder setMetadata(com.google.firestore.bundle.BundleMetadata.Builder builderForValue) { if (metadataBuilder_ == null) { @@ -790,6 +809,7 @@ public Builder setMetadata(com.google.firestore.bundle.BundleMetadata.Builder bu elementTypeCase_ = 1; return this; } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ public Builder mergeMetadata(com.google.firestore.bundle.BundleMetadata value) { if (metadataBuilder_ == null) { @@ -814,6 +834,7 @@ public Builder mergeMetadata(com.google.firestore.bundle.BundleMetadata value) { elementTypeCase_ = 1; return this; } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ public Builder clearMetadata() { if (metadataBuilder_ == null) { @@ -831,10 +852,12 @@ public Builder clearMetadata() { } return this; } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ public com.google.firestore.bundle.BundleMetadata.Builder getMetadataBuilder() { return getMetadataFieldBuilder().getBuilder(); } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ @java.lang.Override public com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder() { @@ -847,6 +870,7 @@ public com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder( return com.google.firestore.bundle.BundleMetadata.getDefaultInstance(); } } + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.bundle.BundleMetadata, @@ -877,6 +901,7 @@ public com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder( com.google.firestore.bundle.NamedQuery.Builder, com.google.firestore.bundle.NamedQueryOrBuilder> namedQueryBuilder_; + /** * .google.firestore.bundle.NamedQuery named_query = 2; * @@ -886,6 +911,7 @@ public com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder( public boolean hasNamedQuery() { return elementTypeCase_ == 2; } + /** * .google.firestore.bundle.NamedQuery named_query = 2; * @@ -905,6 +931,7 @@ public com.google.firestore.bundle.NamedQuery getNamedQuery() { return com.google.firestore.bundle.NamedQuery.getDefaultInstance(); } } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ public Builder setNamedQuery(com.google.firestore.bundle.NamedQuery value) { if (namedQueryBuilder_ == null) { @@ -919,6 +946,7 @@ public Builder setNamedQuery(com.google.firestore.bundle.NamedQuery value) { elementTypeCase_ = 2; return this; } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ public Builder setNamedQuery(com.google.firestore.bundle.NamedQuery.Builder builderForValue) { if (namedQueryBuilder_ == null) { @@ -930,6 +958,7 @@ public Builder setNamedQuery(com.google.firestore.bundle.NamedQuery.Builder buil elementTypeCase_ = 2; return this; } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ public Builder mergeNamedQuery(com.google.firestore.bundle.NamedQuery value) { if (namedQueryBuilder_ == null) { @@ -954,6 +983,7 @@ public Builder mergeNamedQuery(com.google.firestore.bundle.NamedQuery value) { elementTypeCase_ = 2; return this; } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ public Builder clearNamedQuery() { if (namedQueryBuilder_ == null) { @@ -971,10 +1001,12 @@ public Builder clearNamedQuery() { } return this; } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ public com.google.firestore.bundle.NamedQuery.Builder getNamedQueryBuilder() { return getNamedQueryFieldBuilder().getBuilder(); } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ @java.lang.Override public com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder() { @@ -987,6 +1019,7 @@ public com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder() return com.google.firestore.bundle.NamedQuery.getDefaultInstance(); } } + /** .google.firestore.bundle.NamedQuery named_query = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.bundle.NamedQuery, @@ -1017,6 +1050,7 @@ public com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder() com.google.firestore.bundle.BundledDocumentMetadata.Builder, com.google.firestore.bundle.BundledDocumentMetadataOrBuilder> documentMetadataBuilder_; + /** * .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; * @@ -1026,6 +1060,7 @@ public com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder() public boolean hasDocumentMetadata() { return elementTypeCase_ == 3; } + /** * .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; * @@ -1045,6 +1080,7 @@ public com.google.firestore.bundle.BundledDocumentMetadata getDocumentMetadata() return com.google.firestore.bundle.BundledDocumentMetadata.getDefaultInstance(); } } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ public Builder setDocumentMetadata(com.google.firestore.bundle.BundledDocumentMetadata value) { if (documentMetadataBuilder_ == null) { @@ -1059,6 +1095,7 @@ public Builder setDocumentMetadata(com.google.firestore.bundle.BundledDocumentMe elementTypeCase_ = 3; return this; } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ public Builder setDocumentMetadata( com.google.firestore.bundle.BundledDocumentMetadata.Builder builderForValue) { @@ -1071,6 +1108,7 @@ public Builder setDocumentMetadata( elementTypeCase_ = 3; return this; } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ public Builder mergeDocumentMetadata( com.google.firestore.bundle.BundledDocumentMetadata value) { @@ -1097,6 +1135,7 @@ public Builder mergeDocumentMetadata( elementTypeCase_ = 3; return this; } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ public Builder clearDocumentMetadata() { if (documentMetadataBuilder_ == null) { @@ -1114,11 +1153,13 @@ public Builder clearDocumentMetadata() { } return this; } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ public com.google.firestore.bundle.BundledDocumentMetadata.Builder getDocumentMetadataBuilder() { return getDocumentMetadataFieldBuilder().getBuilder(); } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ @java.lang.Override public com.google.firestore.bundle.BundledDocumentMetadataOrBuilder @@ -1132,6 +1173,7 @@ public Builder clearDocumentMetadata() { return com.google.firestore.bundle.BundledDocumentMetadata.getDefaultInstance(); } } + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.bundle.BundledDocumentMetadata, @@ -1162,6 +1204,7 @@ public Builder clearDocumentMetadata() { com.google.firestore.v1.Document.Builder, com.google.firestore.v1.DocumentOrBuilder> documentBuilder_; + /** * .google.firestore.v1.Document document = 4; * @@ -1171,6 +1214,7 @@ public Builder clearDocumentMetadata() { public boolean hasDocument() { return elementTypeCase_ == 4; } + /** * .google.firestore.v1.Document document = 4; * @@ -1190,6 +1234,7 @@ public com.google.firestore.v1.Document getDocument() { return com.google.firestore.v1.Document.getDefaultInstance(); } } + /** .google.firestore.v1.Document document = 4; */ public Builder setDocument(com.google.firestore.v1.Document value) { if (documentBuilder_ == null) { @@ -1204,6 +1249,7 @@ public Builder setDocument(com.google.firestore.v1.Document value) { elementTypeCase_ = 4; return this; } + /** .google.firestore.v1.Document document = 4; */ public Builder setDocument(com.google.firestore.v1.Document.Builder builderForValue) { if (documentBuilder_ == null) { @@ -1215,6 +1261,7 @@ public Builder setDocument(com.google.firestore.v1.Document.Builder builderForVa elementTypeCase_ = 4; return this; } + /** .google.firestore.v1.Document document = 4; */ public Builder mergeDocument(com.google.firestore.v1.Document value) { if (documentBuilder_ == null) { @@ -1239,6 +1286,7 @@ public Builder mergeDocument(com.google.firestore.v1.Document value) { elementTypeCase_ = 4; return this; } + /** .google.firestore.v1.Document document = 4; */ public Builder clearDocument() { if (documentBuilder_ == null) { @@ -1256,10 +1304,12 @@ public Builder clearDocument() { } return this; } + /** .google.firestore.v1.Document document = 4; */ public com.google.firestore.v1.Document.Builder getDocumentBuilder() { return getDocumentFieldBuilder().getBuilder(); } + /** .google.firestore.v1.Document document = 4; */ @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { @@ -1272,6 +1322,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { return com.google.firestore.v1.Document.getDefaultInstance(); } } + /** .google.firestore.v1.Document document = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.v1.Document, diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElementOrBuilder.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElementOrBuilder.java index 5f7bc7af6..8f962bf64 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElementOrBuilder.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleElementOrBuilder.java @@ -30,12 +30,14 @@ public interface BundleElementOrBuilder * @return Whether the metadata field is set. */ boolean hasMetadata(); + /** * .google.firestore.bundle.BundleMetadata metadata = 1; * * @return The metadata. */ com.google.firestore.bundle.BundleMetadata getMetadata(); + /** .google.firestore.bundle.BundleMetadata metadata = 1; */ com.google.firestore.bundle.BundleMetadataOrBuilder getMetadataOrBuilder(); @@ -45,12 +47,14 @@ public interface BundleElementOrBuilder * @return Whether the namedQuery field is set. */ boolean hasNamedQuery(); + /** * .google.firestore.bundle.NamedQuery named_query = 2; * * @return The namedQuery. */ com.google.firestore.bundle.NamedQuery getNamedQuery(); + /** .google.firestore.bundle.NamedQuery named_query = 2; */ com.google.firestore.bundle.NamedQueryOrBuilder getNamedQueryOrBuilder(); @@ -60,12 +64,14 @@ public interface BundleElementOrBuilder * @return Whether the documentMetadata field is set. */ boolean hasDocumentMetadata(); + /** * .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; * * @return The documentMetadata. */ com.google.firestore.bundle.BundledDocumentMetadata getDocumentMetadata(); + /** .google.firestore.bundle.BundledDocumentMetadata document_metadata = 3; */ com.google.firestore.bundle.BundledDocumentMetadataOrBuilder getDocumentMetadataOrBuilder(); @@ -75,12 +81,14 @@ public interface BundleElementOrBuilder * @return Whether the document field is set. */ boolean hasDocument(); + /** * .google.firestore.v1.Document document = 4; * * @return The document. */ com.google.firestore.v1.Document getDocument(); + /** .google.firestore.v1.Document document = 4; */ com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder(); diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadata.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadata.java index e24498b58..40bc7a23a 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadata.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadata.java @@ -33,6 +33,7 @@ public final class BundleMetadata extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.bundle.BundleMetadata) BundleMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use BundleMetadata.newBuilder() to construct. private BundleMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; + /** * * @@ -91,6 +93,7 @@ public java.lang.String getId() { return s; } } + /** * * @@ -117,6 +120,7 @@ public com.google.protobuf.ByteString getIdBytes() { public static final int CREATE_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp createTime_; + /** * * @@ -132,6 +136,7 @@ public com.google.protobuf.ByteString getIdBytes() { public boolean hasCreateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -147,6 +152,7 @@ public boolean hasCreateTime() { public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + /** * * @@ -163,6 +169,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int VERSION_FIELD_NUMBER = 3; private int version_ = 0; + /** * * @@ -181,6 +188,7 @@ public int getVersion() { public static final int TOTAL_DOCUMENTS_FIELD_NUMBER = 4; private int totalDocuments_ = 0; + /** * * @@ -199,6 +207,7 @@ public int getTotalDocuments() { public static final int TOTAL_BYTES_FIELD_NUMBER = 5; private long totalBytes_ = 0L; + /** * * @@ -415,6 +424,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -666,6 +676,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object id_ = ""; + /** * * @@ -688,6 +699,7 @@ public java.lang.String getId() { return (java.lang.String) ref; } } + /** * * @@ -710,6 +722,7 @@ public com.google.protobuf.ByteString getIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -731,6 +744,7 @@ public Builder setId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -748,6 +762,7 @@ public Builder clearId() { onChanged(); return this; } + /** * * @@ -777,6 +792,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** * * @@ -791,6 +807,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { public boolean hasCreateTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -811,6 +828,7 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTimeBuilder_.getMessage(); } } + /** * * @@ -833,6 +851,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -852,6 +871,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -879,6 +899,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -898,6 +919,7 @@ public Builder clearCreateTime() { onChanged(); return this; } + /** * * @@ -912,6 +934,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } + /** * * @@ -930,6 +953,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { : createTime_; } } + /** * * @@ -957,6 +981,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private int version_; + /** * * @@ -972,6 +997,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public int getVersion() { return version_; } + /** * * @@ -991,6 +1017,7 @@ public Builder setVersion(int value) { onChanged(); return this; } + /** * * @@ -1010,6 +1037,7 @@ public Builder clearVersion() { } private int totalDocuments_; + /** * * @@ -1025,6 +1053,7 @@ public Builder clearVersion() { public int getTotalDocuments() { return totalDocuments_; } + /** * * @@ -1044,6 +1073,7 @@ public Builder setTotalDocuments(int value) { onChanged(); return this; } + /** * * @@ -1063,6 +1093,7 @@ public Builder clearTotalDocuments() { } private long totalBytes_; + /** * * @@ -1078,6 +1109,7 @@ public Builder clearTotalDocuments() { public long getTotalBytes() { return totalBytes_; } + /** * * @@ -1097,6 +1129,7 @@ public Builder setTotalBytes(long value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadataOrBuilder.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadataOrBuilder.java index 7dc76511a..b89692e3a 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundleMetadataOrBuilder.java @@ -36,6 +36,7 @@ public interface BundleMetadataOrBuilder * @return The id. */ java.lang.String getId(); + /** * * @@ -61,6 +62,7 @@ public interface BundleMetadataOrBuilder * @return Whether the createTime field is set. */ boolean hasCreateTime(); + /** * * @@ -73,6 +75,7 @@ public interface BundleMetadataOrBuilder * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); + /** * * diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadata.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadata.java index d94bb7203..9c034755e 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadata.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadata.java @@ -33,6 +33,7 @@ public final class BundledDocumentMetadata extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.firestore.bundle.BundledDocumentMetadata) BundledDocumentMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use BundledDocumentMetadata.newBuilder() to construct. private BundledDocumentMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -92,6 +94,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -118,6 +121,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int READ_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -133,6 +137,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasReadTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -148,6 +153,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -164,6 +170,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public static final int EXISTS_FIELD_NUMBER = 3; private boolean exists_ = false; + /** * * @@ -185,6 +192,7 @@ public boolean getExists() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList queries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -199,6 +207,7 @@ public boolean getExists() { public com.google.protobuf.ProtocolStringList getQueriesList() { return queries_; } + /** * * @@ -213,6 +222,7 @@ public com.google.protobuf.ProtocolStringList getQueriesList() { public int getQueriesCount() { return queries_.size(); } + /** * * @@ -228,6 +238,7 @@ public int getQueriesCount() { public java.lang.String getQueries(int index) { return queries_.get(index); } + /** * * @@ -442,6 +453,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -690,6 +702,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -712,6 +725,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -734,6 +748,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -755,6 +770,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -772,6 +788,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -801,6 +818,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -815,6 +833,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasReadTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -833,6 +852,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -855,6 +875,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -874,6 +895,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -901,6 +923,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -920,6 +943,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -934,6 +958,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -950,6 +975,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * @@ -977,6 +1003,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { } private boolean exists_; + /** * * @@ -992,6 +1019,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean getExists() { return exists_; } + /** * * @@ -1011,6 +1039,7 @@ public Builder setExists(boolean value) { onChanged(); return this; } + /** * * @@ -1038,6 +1067,7 @@ private void ensureQueriesIsMutable() { } bitField0_ |= 0x00000008; } + /** * * @@ -1053,6 +1083,7 @@ public com.google.protobuf.ProtocolStringList getQueriesList() { queries_.makeImmutable(); return queries_; } + /** * * @@ -1067,6 +1098,7 @@ public com.google.protobuf.ProtocolStringList getQueriesList() { public int getQueriesCount() { return queries_.size(); } + /** * * @@ -1082,6 +1114,7 @@ public int getQueriesCount() { public java.lang.String getQueries(int index) { return queries_.get(index); } + /** * * @@ -1097,6 +1130,7 @@ public java.lang.String getQueries(int index) { public com.google.protobuf.ByteString getQueriesBytes(int index) { return queries_.getByteString(index); } + /** * * @@ -1120,6 +1154,7 @@ public Builder setQueries(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1142,6 +1177,7 @@ public Builder addQueries(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1161,6 +1197,7 @@ public Builder addAllQueries(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -1179,6 +1216,7 @@ public Builder clearQueries() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadataOrBuilder.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadataOrBuilder.java index 5842713ce..a0c41866e 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadataOrBuilder.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledDocumentMetadataOrBuilder.java @@ -36,6 +36,7 @@ public interface BundledDocumentMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +62,7 @@ public interface BundledDocumentMetadataOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -73,6 +75,7 @@ public interface BundledDocumentMetadataOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * @@ -109,6 +112,7 @@ public interface BundledDocumentMetadataOrBuilder * @return A list containing the queries. */ java.util.List getQueriesList(); + /** * * @@ -121,6 +125,7 @@ public interface BundledDocumentMetadataOrBuilder * @return The count of queries. */ int getQueriesCount(); + /** * * @@ -134,6 +139,7 @@ public interface BundledDocumentMetadataOrBuilder * @return The queries at the given index. */ java.lang.String getQueries(int index); + /** * * diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQuery.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQuery.java index 548a23ece..2514af0e6 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQuery.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQuery.java @@ -33,6 +33,7 @@ public final class BundledQuery extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.bundle.BundledQuery) BundledQueryOrBuilder { private static final long serialVersionUID = 0L; + // Use BundledQuery.newBuilder() to construct. private BundledQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -84,6 +85,7 @@ public enum LimitType implements com.google.protobuf.ProtocolMessageEnum { /** FIRST = 0; */ public static final int FIRST_VALUE = 0; + /** LAST = 1; */ public static final int LAST_VALUE = 1; @@ -184,6 +186,7 @@ public enum QueryTypeCase private QueryTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -218,6 +221,7 @@ public QueryTypeCase getQueryTypeCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -241,6 +245,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -266,6 +271,7 @@ public com.google.protobuf.ByteString getParentBytes() { } public static final int STRUCTURED_QUERY_FIELD_NUMBER = 2; + /** * * @@ -281,6 +287,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -299,6 +306,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { } return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } + /** * * @@ -318,6 +326,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public static final int LIMIT_TYPE_FIELD_NUMBER = 3; private int limitType_ = 0; + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * @@ -327,6 +336,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public int getLimitTypeValue() { return limitType_; } + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * @@ -532,6 +542,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -773,6 +784,7 @@ public Builder clearQueryType() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -795,6 +807,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -817,6 +830,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -838,6 +852,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -855,6 +870,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -883,6 +899,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.StructuredQuery.Builder, com.google.firestore.v1.StructuredQueryOrBuilder> structuredQueryBuilder_; + /** * * @@ -898,6 +915,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -923,6 +941,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -945,6 +964,7 @@ public Builder setStructuredQuery(com.google.firestore.v1.StructuredQuery value) queryTypeCase_ = 2; return this; } + /** * * @@ -965,6 +985,7 @@ public Builder setStructuredQuery( queryTypeCase_ = 2; return this; } + /** * * @@ -997,6 +1018,7 @@ public Builder mergeStructuredQuery(com.google.firestore.v1.StructuredQuery valu queryTypeCase_ = 2; return this; } + /** * * @@ -1022,6 +1044,7 @@ public Builder clearStructuredQuery() { } return this; } + /** * * @@ -1034,6 +1057,7 @@ public Builder clearStructuredQuery() { public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder() { return getStructuredQueryFieldBuilder().getBuilder(); } + /** * * @@ -1054,6 +1078,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -1088,6 +1113,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil } private int limitType_ = 0; + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * @@ -1097,6 +1123,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public int getLimitTypeValue() { return limitType_; } + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * @@ -1109,6 +1136,7 @@ public Builder setLimitTypeValue(int value) { onChanged(); return this; } + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * @@ -1122,6 +1150,7 @@ public com.google.firestore.bundle.BundledQuery.LimitType getLimitType() { ? com.google.firestore.bundle.BundledQuery.LimitType.UNRECOGNIZED : result; } + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * @@ -1137,6 +1166,7 @@ public Builder setLimitType(com.google.firestore.bundle.BundledQuery.LimitType v onChanged(); return this; } + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQueryOrBuilder.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQueryOrBuilder.java index 5c74f3b74..cfcee77d5 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQueryOrBuilder.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/BundledQueryOrBuilder.java @@ -36,6 +36,7 @@ public interface BundledQueryOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -61,6 +62,7 @@ public interface BundledQueryOrBuilder * @return Whether the structuredQuery field is set. */ boolean hasStructuredQuery(); + /** * * @@ -73,6 +75,7 @@ public interface BundledQueryOrBuilder * @return The structuredQuery. */ com.google.firestore.v1.StructuredQuery getStructuredQuery(); + /** * * @@ -90,6 +93,7 @@ public interface BundledQueryOrBuilder * @return The enum numeric value on the wire for limitType. */ int getLimitTypeValue(); + /** * .google.firestore.bundle.BundledQuery.LimitType limit_type = 3; * diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQuery.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQuery.java index ae4962699..97ce08a97 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQuery.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQuery.java @@ -34,6 +34,7 @@ public final class NamedQuery extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.bundle.NamedQuery) NamedQueryOrBuilder { private static final long serialVersionUID = 0L; + // Use NamedQuery.newBuilder() to construct. private NamedQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -122,6 +125,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int BUNDLED_QUERY_FIELD_NUMBER = 2; private com.google.firestore.bundle.BundledQuery bundledQuery_; + /** * * @@ -137,6 +141,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasBundledQuery() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -154,6 +159,7 @@ public com.google.firestore.bundle.BundledQuery getBundledQuery() { ? com.google.firestore.bundle.BundledQuery.getDefaultInstance() : bundledQuery_; } + /** * * @@ -172,6 +178,7 @@ public com.google.firestore.bundle.BundledQueryOrBuilder getBundledQueryOrBuilde public static final int READ_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -188,6 +195,7 @@ public com.google.firestore.bundle.BundledQueryOrBuilder getBundledQueryOrBuilde public boolean hasReadTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -204,6 +212,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -405,6 +414,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -638,6 +648,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -662,6 +673,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -686,6 +698,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -709,6 +722,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -728,6 +742,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -759,6 +774,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.firestore.bundle.BundledQuery.Builder, com.google.firestore.bundle.BundledQueryOrBuilder> bundledQueryBuilder_; + /** * * @@ -773,6 +789,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasBundledQuery() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -793,6 +810,7 @@ public com.google.firestore.bundle.BundledQuery getBundledQuery() { return bundledQueryBuilder_.getMessage(); } } + /** * * @@ -815,6 +833,7 @@ public Builder setBundledQuery(com.google.firestore.bundle.BundledQuery value) { onChanged(); return this; } + /** * * @@ -835,6 +854,7 @@ public Builder setBundledQuery( onChanged(); return this; } + /** * * @@ -862,6 +882,7 @@ public Builder mergeBundledQuery(com.google.firestore.bundle.BundledQuery value) } return this; } + /** * * @@ -881,6 +902,7 @@ public Builder clearBundledQuery() { onChanged(); return this; } + /** * * @@ -895,6 +917,7 @@ public com.google.firestore.bundle.BundledQuery.Builder getBundledQueryBuilder() onChanged(); return getBundledQueryFieldBuilder().getBuilder(); } + /** * * @@ -913,6 +936,7 @@ public com.google.firestore.bundle.BundledQueryOrBuilder getBundledQueryOrBuilde : bundledQuery_; } } + /** * * @@ -945,6 +969,7 @@ public com.google.firestore.bundle.BundledQueryOrBuilder getBundledQueryOrBuilde com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -960,6 +985,7 @@ public com.google.firestore.bundle.BundledQueryOrBuilder getBundledQueryOrBuilde public boolean hasReadTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -979,6 +1005,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -1002,6 +1029,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1022,6 +1050,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -1050,6 +1079,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1070,6 +1100,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -1085,6 +1116,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1102,6 +1134,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQueryOrBuilder.java b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQueryOrBuilder.java index f22e8c96b..2155d5fab 100644 --- a/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQueryOrBuilder.java +++ b/proto-google-cloud-firestore-bundle-v1/src/main/java/com/google/firestore/bundle/NamedQueryOrBuilder.java @@ -38,6 +38,7 @@ public interface NamedQueryOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -65,6 +66,7 @@ public interface NamedQueryOrBuilder * @return Whether the bundledQuery field is set. */ boolean hasBundledQuery(); + /** * * @@ -77,6 +79,7 @@ public interface NamedQueryOrBuilder * @return The bundledQuery. */ com.google.firestore.bundle.BundledQuery getBundledQuery(); + /** * * @@ -101,6 +104,7 @@ public interface NamedQueryOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -114,6 +118,7 @@ public interface NamedQueryOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/clirr-ignored-differences.xml b/proto-google-cloud-firestore-v1/clirr-ignored-differences.xml index 7355f0619..bca500b0c 100644 --- a/proto-google-cloud-firestore-v1/clirr-ignored-differences.xml +++ b/proto-google-cloud-firestore-v1/clirr-ignored-differences.xml @@ -161,4 +161,49 @@ com/google/firestore/v1/StructuredQuery$FindNearestOrBuilder boolean hasDistanceThreshold() + + 7012 + com/google/firestore/v1/ValueOrBuilder + java.lang.String getFieldReferenceValue() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + com.google.protobuf.ByteString getFieldReferenceValueBytes() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + com.google.firestore.v1.Function getFunctionValue() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + com.google.firestore.v1.FunctionOrBuilder getFunctionValueOrBuilder() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + com.google.firestore.v1.Pipeline getPipelineValue() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + com.google.firestore.v1.PipelineOrBuilder getPipelineValueOrBuilder() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + boolean hasFieldReferenceValue() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + boolean hasFunctionValue() + + + 7012 + com/google/firestore/v1/ValueOrBuilder + boolean hasPipelineValue() + diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResult.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResult.java index 6279d2942..4430ebc06 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResult.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResult.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/aggregation_result.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -37,6 +37,7 @@ public final class AggregationResult extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.firestore.v1.AggregationResult) AggregationResultOrBuilder { private static final long serialVersionUID = 0L; + // Use AggregationResult.newBuilder() to construct. private AggregationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -108,6 +109,7 @@ private static final class AggregateFieldsDefaultEntryHolder { public int getAggregateFieldsCount() { return internalGetAggregateFields().getMap().size(); } + /** * * @@ -129,12 +131,14 @@ public boolean containsAggregateFields(java.lang.String key) { } return internalGetAggregateFields().getMap().containsKey(key); } + /** Use {@link #getAggregateFieldsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAggregateFields() { return getAggregateFieldsMap(); } + /** * * @@ -153,6 +157,7 @@ public java.util.Map getAggrega public java.util.Map getAggregateFieldsMap() { return internalGetAggregateFields().getMap(); } + /** * * @@ -179,6 +184,7 @@ public java.util.Map getAggrega internalGetAggregateFields().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -374,6 +380,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -605,7 +612,8 @@ public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilde defaultEntry() { return AggregateFieldsDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final AggregateFieldsConverter aggregateFieldsConverter = new AggregateFieldsConverter(); @@ -646,6 +654,7 @@ public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilde public int getAggregateFieldsCount() { return internalGetAggregateFields().ensureBuilderMap().size(); } + /** * * @@ -667,12 +676,14 @@ public boolean containsAggregateFields(java.lang.String key) { } return internalGetAggregateFields().ensureBuilderMap().containsKey(key); } + /** Use {@link #getAggregateFieldsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAggregateFields() { return getAggregateFieldsMap(); } + /** * * @@ -691,6 +702,7 @@ public java.util.Map getAggrega public java.util.Map getAggregateFieldsMap() { return internalGetAggregateFields().getImmutableMap(); } + /** * * @@ -717,6 +729,7 @@ public java.util.Map getAggrega internalGetMutableAggregateFields().ensureBuilderMap(); return map.containsKey(key) ? aggregateFieldsConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -749,6 +762,7 @@ public Builder clearAggregateFields() { internalGetMutableAggregateFields().clear(); return this; } + /** * * @@ -770,6 +784,7 @@ public Builder removeAggregateFields(java.lang.String key) { internalGetMutableAggregateFields().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map @@ -777,6 +792,7 @@ public Builder removeAggregateFields(java.lang.String key) { bitField0_ |= 0x00000001; return internalGetMutableAggregateFields().ensureMessageMap(); } + /** * * @@ -802,6 +818,7 @@ public Builder putAggregateFields(java.lang.String key, com.google.firestore.v1. bitField0_ |= 0x00000001; return this; } + /** * * @@ -828,6 +845,7 @@ public Builder putAllAggregateFields( bitField0_ |= 0x00000001; return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultOrBuilder.java index 31cd9b122..c8f252a89 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/aggregation_result.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface AggregationResultOrBuilder @@ -39,6 +39,7 @@ public interface AggregationResultOrBuilder * map<string, .google.firestore.v1.Value> aggregate_fields = 2; */ int getAggregateFieldsCount(); + /** * * @@ -54,9 +55,11 @@ public interface AggregationResultOrBuilder * map<string, .google.firestore.v1.Value> aggregate_fields = 2; */ boolean containsAggregateFields(java.lang.String key); + /** Use {@link #getAggregateFieldsMap()} instead. */ @java.lang.Deprecated java.util.Map getAggregateFields(); + /** * * @@ -72,6 +75,7 @@ public interface AggregationResultOrBuilder * map<string, .google.firestore.v1.Value> aggregate_fields = 2; */ java.util.Map getAggregateFieldsMap(); + /** * * @@ -91,6 +95,7 @@ com.google.firestore.v1.Value getAggregateFieldsOrDefault( java.lang.String key, /* nullable */ com.google.firestore.v1.Value defaultValue); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultProto.java index 045308c83..40b0565cf 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AggregationResultProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/aggregation_result.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class AggregationResultProto { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java index 68fb85de8..e8b7623ed 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class ArrayValue extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.ArrayValue) ArrayValueOrBuilder { private static final long serialVersionUID = 0L; + // Use ArrayValue.newBuilder() to construct. private ArrayValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List values_; + /** * * @@ -80,6 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getValuesList() { return values_; } + /** * * @@ -93,6 +96,7 @@ public java.util.List getValuesList() { public java.util.List getValuesOrBuilderList() { return values_; } + /** * * @@ -106,6 +110,7 @@ public java.util.List getValue public int getValuesCount() { return values_.size(); } + /** * * @@ -119,6 +124,7 @@ public int getValuesCount() { public com.google.firestore.v1.Value getValues(int index) { return values_.get(index); } + /** * * @@ -292,6 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -549,6 +556,7 @@ public java.util.List getValuesList() { return valuesBuilder_.getMessageList(); } } + /** * * @@ -565,6 +573,7 @@ public int getValuesCount() { return valuesBuilder_.getCount(); } } + /** * * @@ -581,6 +590,7 @@ public com.google.firestore.v1.Value getValues(int index) { return valuesBuilder_.getMessage(index); } } + /** * * @@ -603,6 +613,7 @@ public Builder setValues(int index, com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -622,6 +633,7 @@ public Builder setValues(int index, com.google.firestore.v1.Value.Builder builde } return this; } + /** * * @@ -644,6 +656,7 @@ public Builder addValues(com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -666,6 +679,7 @@ public Builder addValues(int index, com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -685,6 +699,7 @@ public Builder addValues(com.google.firestore.v1.Value.Builder builderForValue) } return this; } + /** * * @@ -704,6 +719,7 @@ public Builder addValues(int index, com.google.firestore.v1.Value.Builder builde } return this; } + /** * * @@ -724,6 +740,7 @@ public Builder addAllValues( } return this; } + /** * * @@ -743,6 +760,7 @@ public Builder clearValues() { } return this; } + /** * * @@ -762,6 +780,7 @@ public Builder removeValues(int index) { } return this; } + /** * * @@ -774,6 +793,7 @@ public Builder removeValues(int index) { public com.google.firestore.v1.Value.Builder getValuesBuilder(int index) { return getValuesFieldBuilder().getBuilder(index); } + /** * * @@ -790,6 +810,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { return valuesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -807,6 +828,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { return java.util.Collections.unmodifiableList(values_); } } + /** * * @@ -819,6 +841,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { public com.google.firestore.v1.Value.Builder addValuesBuilder() { return getValuesFieldBuilder().addBuilder(com.google.firestore.v1.Value.getDefaultInstance()); } + /** * * @@ -832,6 +855,7 @@ public com.google.firestore.v1.Value.Builder addValuesBuilder(int index) { return getValuesFieldBuilder() .addBuilder(index, com.google.firestore.v1.Value.getDefaultInstance()); } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValueOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValueOrBuilder.java index 816cff9fc..dd24004d2 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValueOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValueOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ArrayValueOrBuilder @@ -34,6 +34,7 @@ public interface ArrayValueOrBuilder * repeated .google.firestore.v1.Value values = 1; */ java.util.List getValuesList(); + /** * * @@ -44,6 +45,7 @@ public interface ArrayValueOrBuilder * repeated .google.firestore.v1.Value values = 1; */ com.google.firestore.v1.Value getValues(int index); + /** * * @@ -54,6 +56,7 @@ public interface ArrayValueOrBuilder * repeated .google.firestore.v1.Value values = 1; */ int getValuesCount(); + /** * * @@ -64,6 +67,7 @@ public interface ArrayValueOrBuilder * repeated .google.firestore.v1.Value values = 1; */ java.util.List getValuesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java index de9916966..9d4fd79cb 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class BatchGetDocumentsRequest extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchGetDocumentsRequest) BatchGetDocumentsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use BatchGetDocumentsRequest.newBuilder() to construct. private BatchGetDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -84,6 +85,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -122,6 +124,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -146,6 +149,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -176,6 +180,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList documents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -193,6 +198,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { public com.google.protobuf.ProtocolStringList getDocumentsList() { return documents_; } + /** * * @@ -210,6 +216,7 @@ public com.google.protobuf.ProtocolStringList getDocumentsList() { public int getDocumentsCount() { return documents_.size(); } + /** * * @@ -228,6 +235,7 @@ public int getDocumentsCount() { public java.lang.String getDocuments(int index) { return documents_.get(index); } + /** * * @@ -249,6 +257,7 @@ public com.google.protobuf.ByteString getDocumentsBytes(int index) { public static final int MASK_FIELD_NUMBER = 3; private com.google.firestore.v1.DocumentMask mask_; + /** * * @@ -267,6 +276,7 @@ public com.google.protobuf.ByteString getDocumentsBytes(int index) { public boolean hasMask() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -285,6 +295,7 @@ public boolean hasMask() { public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } + /** * * @@ -303,6 +314,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { } public static final int TRANSACTION_FIELD_NUMBER = 4; + /** * * @@ -318,6 +330,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasTransaction() { return consistencySelectorCase_ == 4; } + /** * * @@ -338,6 +351,7 @@ public com.google.protobuf.ByteString getTransaction() { } public static final int NEW_TRANSACTION_FIELD_NUMBER = 5; + /** * * @@ -356,6 +370,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } + /** * * @@ -377,6 +392,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { } return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } + /** * * @@ -398,6 +414,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu } public static final int READ_TIME_FIELD_NUMBER = 7; + /** * * @@ -417,6 +434,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu public boolean hasReadTime() { return consistencySelectorCase_ == 7; } + /** * * @@ -439,6 +457,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -703,6 +722,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1012,6 +1032,7 @@ public Builder clearConsistencySelector() { private int bitField0_; private java.lang.Object database_ = ""; + /** * * @@ -1035,6 +1056,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -1058,6 +1080,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1080,6 +1103,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1098,6 +1122,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -1131,6 +1156,7 @@ private void ensureDocumentsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1149,6 +1175,7 @@ public com.google.protobuf.ProtocolStringList getDocumentsList() { documents_.makeImmutable(); return documents_; } + /** * * @@ -1166,6 +1193,7 @@ public com.google.protobuf.ProtocolStringList getDocumentsList() { public int getDocumentsCount() { return documents_.size(); } + /** * * @@ -1184,6 +1212,7 @@ public int getDocumentsCount() { public java.lang.String getDocuments(int index) { return documents_.get(index); } + /** * * @@ -1202,6 +1231,7 @@ public java.lang.String getDocuments(int index) { public com.google.protobuf.ByteString getDocumentsBytes(int index) { return documents_.getByteString(index); } + /** * * @@ -1228,6 +1258,7 @@ public Builder setDocuments(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1253,6 +1284,7 @@ public Builder addDocuments(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1275,6 +1307,7 @@ public Builder addAllDocuments(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -1296,6 +1329,7 @@ public Builder clearDocuments() { onChanged(); return this; } + /** * * @@ -1329,6 +1363,7 @@ public Builder addDocumentsBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.DocumentMask.Builder, com.google.firestore.v1.DocumentMaskOrBuilder> maskBuilder_; + /** * * @@ -1346,6 +1381,7 @@ public Builder addDocumentsBytes(com.google.protobuf.ByteString value) { public boolean hasMask() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1367,6 +1403,7 @@ public com.google.firestore.v1.DocumentMask getMask() { return maskBuilder_.getMessage(); } } + /** * * @@ -1392,6 +1429,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask value) { onChanged(); return this; } + /** * * @@ -1414,6 +1452,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask.Builder builderForVa onChanged(); return this; } + /** * * @@ -1444,6 +1483,7 @@ public Builder mergeMask(com.google.firestore.v1.DocumentMask value) { } return this; } + /** * * @@ -1466,6 +1506,7 @@ public Builder clearMask() { onChanged(); return this; } + /** * * @@ -1483,6 +1524,7 @@ public com.google.firestore.v1.DocumentMask.Builder getMaskBuilder() { onChanged(); return getMaskFieldBuilder().getBuilder(); } + /** * * @@ -1502,6 +1544,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } } + /** * * @@ -1545,6 +1588,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasTransaction() { return consistencySelectorCase_ == 4; } + /** * * @@ -1562,6 +1606,7 @@ public com.google.protobuf.ByteString getTransaction() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1583,6 +1628,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1608,6 +1654,7 @@ public Builder clearTransaction() { com.google.firestore.v1.TransactionOptions.Builder, com.google.firestore.v1.TransactionOptionsOrBuilder> newTransactionBuilder_; + /** * * @@ -1626,6 +1673,7 @@ public Builder clearTransaction() { public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } + /** * * @@ -1654,6 +1702,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } } + /** * * @@ -1679,6 +1728,7 @@ public Builder setNewTransaction(com.google.firestore.v1.TransactionOptions valu consistencySelectorCase_ = 5; return this; } + /** * * @@ -1702,6 +1752,7 @@ public Builder setNewTransaction( consistencySelectorCase_ = 5; return this; } + /** * * @@ -1738,6 +1789,7 @@ public Builder mergeNewTransaction(com.google.firestore.v1.TransactionOptions va consistencySelectorCase_ = 5; return this; } + /** * * @@ -1766,6 +1818,7 @@ public Builder clearNewTransaction() { } return this; } + /** * * @@ -1781,6 +1834,7 @@ public Builder clearNewTransaction() { public com.google.firestore.v1.TransactionOptions.Builder getNewTransactionBuilder() { return getNewTransactionFieldBuilder().getBuilder(); } + /** * * @@ -1804,6 +1858,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } } + /** * * @@ -1845,6 +1900,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1864,6 +1920,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu public boolean hasReadTime() { return consistencySelectorCase_ == 7; } + /** * * @@ -1893,6 +1950,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1919,6 +1977,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 7; return this; } + /** * * @@ -1942,6 +2001,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 7; return this; } + /** * * @@ -1978,6 +2038,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 7; return this; } + /** * * @@ -2007,6 +2068,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -2023,6 +2085,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -2047,6 +2110,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java index 005319b70..bca7b7817 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BatchGetDocumentsRequestOrBuilder @@ -37,6 +37,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -66,6 +67,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return A list containing the documents. */ java.util.List getDocumentsList(); + /** * * @@ -81,6 +83,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return The count of documents. */ int getDocumentsCount(); + /** * * @@ -97,6 +100,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return The documents at the given index. */ java.lang.String getDocuments(int index); + /** * * @@ -129,6 +133,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return Whether the mask field is set. */ boolean hasMask(); + /** * * @@ -144,6 +149,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return The mask. */ com.google.firestore.v1.DocumentMask getMask(); + /** * * @@ -170,6 +176,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return Whether the transaction field is set. */ boolean hasTransaction(); + /** * * @@ -198,6 +205,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return Whether the newTransaction field is set. */ boolean hasNewTransaction(); + /** * * @@ -213,6 +221,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return The newTransaction. */ com.google.firestore.v1.TransactionOptions getNewTransaction(); + /** * * @@ -243,6 +252,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -259,6 +269,7 @@ public interface BatchGetDocumentsRequestOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java index da6bc616e..8f940f8cc 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class BatchGetDocumentsResponse extends com.google.protobuf.Generat // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchGetDocumentsResponse) BatchGetDocumentsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use BatchGetDocumentsResponse.newBuilder() to construct. private BatchGetDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -82,6 +83,7 @@ public enum ResultCase private ResultCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -115,6 +117,7 @@ public ResultCase getResultCase() { } public static final int FOUND_FIELD_NUMBER = 1; + /** * * @@ -130,6 +133,7 @@ public ResultCase getResultCase() { public boolean hasFound() { return resultCase_ == 1; } + /** * * @@ -148,6 +152,7 @@ public com.google.firestore.v1.Document getFound() { } return com.google.firestore.v1.Document.getDefaultInstance(); } + /** * * @@ -166,6 +171,7 @@ public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() { } public static final int MISSING_FIELD_NUMBER = 2; + /** * * @@ -181,6 +187,7 @@ public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() { public boolean hasMissing() { return resultCase_ == 2; } + /** * * @@ -209,6 +216,7 @@ public java.lang.String getMissing() { return s; } } + /** * * @@ -240,6 +248,7 @@ public com.google.protobuf.ByteString getMissingBytes() { public static final int TRANSACTION_FIELD_NUMBER = 3; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -261,6 +270,7 @@ public com.google.protobuf.ByteString getTransaction() { public static final int READ_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -279,6 +289,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasReadTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -297,6 +308,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -524,6 +536,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -799,6 +812,7 @@ public Builder clearResult() { com.google.firestore.v1.Document.Builder, com.google.firestore.v1.DocumentOrBuilder> foundBuilder_; + /** * * @@ -814,6 +828,7 @@ public Builder clearResult() { public boolean hasFound() { return resultCase_ == 1; } + /** * * @@ -839,6 +854,7 @@ public com.google.firestore.v1.Document getFound() { return com.google.firestore.v1.Document.getDefaultInstance(); } } + /** * * @@ -861,6 +877,7 @@ public Builder setFound(com.google.firestore.v1.Document value) { resultCase_ = 1; return this; } + /** * * @@ -880,6 +897,7 @@ public Builder setFound(com.google.firestore.v1.Document.Builder builderForValue resultCase_ = 1; return this; } + /** * * @@ -911,6 +929,7 @@ public Builder mergeFound(com.google.firestore.v1.Document value) { resultCase_ = 1; return this; } + /** * * @@ -936,6 +955,7 @@ public Builder clearFound() { } return this; } + /** * * @@ -948,6 +968,7 @@ public Builder clearFound() { public com.google.firestore.v1.Document.Builder getFoundBuilder() { return getFoundFieldBuilder().getBuilder(); } + /** * * @@ -968,6 +989,7 @@ public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() { return com.google.firestore.v1.Document.getDefaultInstance(); } } + /** * * @@ -1015,6 +1037,7 @@ public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() { public boolean hasMissing() { return resultCase_ == 2; } + /** * * @@ -1044,6 +1067,7 @@ public java.lang.String getMissing() { return (java.lang.String) ref; } } + /** * * @@ -1073,6 +1097,7 @@ public com.google.protobuf.ByteString getMissingBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1095,6 +1120,7 @@ public Builder setMissing(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1115,6 +1141,7 @@ public Builder clearMissing() { } return this; } + /** * * @@ -1140,6 +1167,7 @@ public Builder setMissingBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1158,6 +1186,7 @@ public Builder setMissingBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getTransaction() { return transaction_; } + /** * * @@ -1182,6 +1211,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1209,6 +1239,7 @@ public Builder clearTransaction() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1226,6 +1257,7 @@ public Builder clearTransaction() { public boolean hasReadTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1247,6 +1279,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -1272,6 +1305,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1294,6 +1328,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -1324,6 +1359,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1346,6 +1382,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -1363,6 +1400,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1382,6 +1420,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java index 9fe476691..f5786e8ea 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BatchGetDocumentsResponseOrBuilder @@ -36,6 +36,7 @@ public interface BatchGetDocumentsResponseOrBuilder * @return Whether the found field is set. */ boolean hasFound(); + /** * * @@ -48,6 +49,7 @@ public interface BatchGetDocumentsResponseOrBuilder * @return The found. */ com.google.firestore.v1.Document getFound(); + /** * * @@ -72,6 +74,7 @@ public interface BatchGetDocumentsResponseOrBuilder * @return Whether the missing field is set. */ boolean hasMissing(); + /** * * @@ -85,6 +88,7 @@ public interface BatchGetDocumentsResponseOrBuilder * @return The missing. */ java.lang.String getMissing(); + /** * * @@ -130,6 +134,7 @@ public interface BatchGetDocumentsResponseOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -145,6 +150,7 @@ public interface BatchGetDocumentsResponseOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequest.java index 0fd33f0fb..dcf51ffde 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class BatchWriteRequest extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchWriteRequest) BatchWriteRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use BatchWriteRequest.newBuilder() to construct. private BatchWriteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -105,6 +107,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -134,6 +137,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { @SuppressWarnings("serial") private java.util.List writes_; + /** * * @@ -151,6 +155,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { public java.util.List getWritesList() { return writes_; } + /** * * @@ -168,6 +173,7 @@ public java.util.List getWritesList() { public java.util.List getWritesOrBuilderList() { return writes_; } + /** * * @@ -185,6 +191,7 @@ public java.util.List getWrite public int getWritesCount() { return writes_.size(); } + /** * * @@ -202,6 +209,7 @@ public int getWritesCount() { public com.google.firestore.v1.Write getWrites(int index) { return writes_.get(index); } + /** * * @@ -246,6 +254,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -262,12 +271,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -281,6 +292,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -301,6 +313,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -509,6 +522,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -793,6 +807,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object database_ = ""; + /** * * @@ -816,6 +831,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -839,6 +855,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -861,6 +878,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -879,6 +897,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -939,6 +958,7 @@ public java.util.List getWritesList() { return writesBuilder_.getMessageList(); } } + /** * * @@ -959,6 +979,7 @@ public int getWritesCount() { return writesBuilder_.getCount(); } } + /** * * @@ -979,6 +1000,7 @@ public com.google.firestore.v1.Write getWrites(int index) { return writesBuilder_.getMessage(index); } } + /** * * @@ -1005,6 +1027,7 @@ public Builder setWrites(int index, com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -1028,6 +1051,7 @@ public Builder setWrites(int index, com.google.firestore.v1.Write.Builder builde } return this; } + /** * * @@ -1054,6 +1078,7 @@ public Builder addWrites(com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -1080,6 +1105,7 @@ public Builder addWrites(int index, com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -1103,6 +1129,7 @@ public Builder addWrites(com.google.firestore.v1.Write.Builder builderForValue) } return this; } + /** * * @@ -1126,6 +1153,7 @@ public Builder addWrites(int index, com.google.firestore.v1.Write.Builder builde } return this; } + /** * * @@ -1150,6 +1178,7 @@ public Builder addAllWrites( } return this; } + /** * * @@ -1173,6 +1202,7 @@ public Builder clearWrites() { } return this; } + /** * * @@ -1196,6 +1226,7 @@ public Builder removeWrites(int index) { } return this; } + /** * * @@ -1212,6 +1243,7 @@ public Builder removeWrites(int index) { public com.google.firestore.v1.Write.Builder getWritesBuilder(int index) { return getWritesFieldBuilder().getBuilder(index); } + /** * * @@ -1232,6 +1264,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return writesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1253,6 +1286,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return java.util.Collections.unmodifiableList(writes_); } } + /** * * @@ -1269,6 +1303,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { public com.google.firestore.v1.Write.Builder addWritesBuilder() { return getWritesFieldBuilder().addBuilder(com.google.firestore.v1.Write.getDefaultInstance()); } + /** * * @@ -1286,6 +1321,7 @@ public com.google.firestore.v1.Write.Builder addWritesBuilder(int index) { return getWritesFieldBuilder() .addBuilder(index, com.google.firestore.v1.Write.getDefaultInstance()); } + /** * * @@ -1345,6 +1381,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1361,12 +1398,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -1380,6 +1419,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1400,6 +1440,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1426,6 +1467,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1442,12 +1484,14 @@ public Builder removeLabels(java.lang.String key) { internalGetMutableLabels().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000004; return internalGetMutableLabels().getMutableMap(); } + /** * * @@ -1468,6 +1512,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000004; return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequestOrBuilder.java index 6093f96ba..b992c09ff 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BatchWriteRequestOrBuilder @@ -37,6 +37,7 @@ public interface BatchWriteRequestOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -65,6 +66,7 @@ public interface BatchWriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ java.util.List getWritesList(); + /** * * @@ -79,6 +81,7 @@ public interface BatchWriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ com.google.firestore.v1.Write getWrites(int index); + /** * * @@ -93,6 +96,7 @@ public interface BatchWriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ int getWritesCount(); + /** * * @@ -107,6 +111,7 @@ public interface BatchWriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ java.util.List getWritesOrBuilderList(); + /** * * @@ -132,6 +137,7 @@ public interface BatchWriteRequestOrBuilder * map<string, string> labels = 3; */ int getLabelsCount(); + /** * * @@ -142,9 +148,11 @@ public interface BatchWriteRequestOrBuilder * map<string, string> labels = 3; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -155,6 +163,7 @@ public interface BatchWriteRequestOrBuilder * map<string, string> labels = 3; */ java.util.Map getLabelsMap(); + /** * * @@ -169,6 +178,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponse.java index 1194d7771..a947dd165 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class BatchWriteResponse extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchWriteResponse) BatchWriteResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use BatchWriteResponse.newBuilder() to construct. private BatchWriteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List writeResults_; + /** * * @@ -85,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getWriteResultsList() { return writeResults_; } + /** * * @@ -102,6 +105,7 @@ public java.util.List getWriteResultsList() getWriteResultsOrBuilderList() { return writeResults_; } + /** * * @@ -118,6 +122,7 @@ public java.util.List getWriteResultsList() public int getWriteResultsCount() { return writeResults_.size(); } + /** * * @@ -134,6 +139,7 @@ public int getWriteResultsCount() { public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResults_.get(index); } + /** * * @@ -155,6 +161,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int @SuppressWarnings("serial") private java.util.List status_; + /** * * @@ -171,6 +178,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int public java.util.List getStatusList() { return status_; } + /** * * @@ -187,6 +195,7 @@ public java.util.List getStatusList() { public java.util.List getStatusOrBuilderList() { return status_; } + /** * * @@ -203,6 +212,7 @@ public java.util.List getStatusOrBuild public int getStatusCount() { return status_.size(); } + /** * * @@ -219,6 +229,7 @@ public int getStatusCount() { public com.google.rpc.Status getStatus(int index) { return status_.get(index); } + /** * * @@ -408,6 +419,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -726,6 +738,7 @@ public java.util.List getWriteResultsList() return writeResultsBuilder_.getMessageList(); } } + /** * * @@ -745,6 +758,7 @@ public int getWriteResultsCount() { return writeResultsBuilder_.getCount(); } } + /** * * @@ -764,6 +778,7 @@ public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResultsBuilder_.getMessage(index); } } + /** * * @@ -789,6 +804,7 @@ public Builder setWriteResults(int index, com.google.firestore.v1.WriteResult va } return this; } + /** * * @@ -812,6 +828,7 @@ public Builder setWriteResults( } return this; } + /** * * @@ -837,6 +854,7 @@ public Builder addWriteResults(com.google.firestore.v1.WriteResult value) { } return this; } + /** * * @@ -862,6 +880,7 @@ public Builder addWriteResults(int index, com.google.firestore.v1.WriteResult va } return this; } + /** * * @@ -884,6 +903,7 @@ public Builder addWriteResults(com.google.firestore.v1.WriteResult.Builder build } return this; } + /** * * @@ -907,6 +927,7 @@ public Builder addWriteResults( } return this; } + /** * * @@ -930,6 +951,7 @@ public Builder addAllWriteResults( } return this; } + /** * * @@ -952,6 +974,7 @@ public Builder clearWriteResults() { } return this; } + /** * * @@ -974,6 +997,7 @@ public Builder removeWriteResults(int index) { } return this; } + /** * * @@ -989,6 +1013,7 @@ public Builder removeWriteResults(int index) { public com.google.firestore.v1.WriteResult.Builder getWriteResultsBuilder(int index) { return getWriteResultsFieldBuilder().getBuilder(index); } + /** * * @@ -1008,6 +1033,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int return writeResultsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1028,6 +1054,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int return java.util.Collections.unmodifiableList(writeResults_); } } + /** * * @@ -1044,6 +1071,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder() { return getWriteResultsFieldBuilder() .addBuilder(com.google.firestore.v1.WriteResult.getDefaultInstance()); } + /** * * @@ -1060,6 +1088,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int in return getWriteResultsFieldBuilder() .addBuilder(index, com.google.firestore.v1.WriteResult.getDefaultInstance()); } + /** * * @@ -1126,6 +1155,7 @@ public java.util.List getStatusList() { return statusBuilder_.getMessageList(); } } + /** * * @@ -1145,6 +1175,7 @@ public int getStatusCount() { return statusBuilder_.getCount(); } } + /** * * @@ -1164,6 +1195,7 @@ public com.google.rpc.Status getStatus(int index) { return statusBuilder_.getMessage(index); } } + /** * * @@ -1189,6 +1221,7 @@ public Builder setStatus(int index, com.google.rpc.Status value) { } return this; } + /** * * @@ -1211,6 +1244,7 @@ public Builder setStatus(int index, com.google.rpc.Status.Builder builderForValu } return this; } + /** * * @@ -1236,6 +1270,7 @@ public Builder addStatus(com.google.rpc.Status value) { } return this; } + /** * * @@ -1261,6 +1296,7 @@ public Builder addStatus(int index, com.google.rpc.Status value) { } return this; } + /** * * @@ -1283,6 +1319,7 @@ public Builder addStatus(com.google.rpc.Status.Builder builderForValue) { } return this; } + /** * * @@ -1305,6 +1342,7 @@ public Builder addStatus(int index, com.google.rpc.Status.Builder builderForValu } return this; } + /** * * @@ -1327,6 +1365,7 @@ public Builder addAllStatus(java.lang.Iterable } return this; } + /** * * @@ -1349,6 +1388,7 @@ public Builder clearStatus() { } return this; } + /** * * @@ -1371,6 +1411,7 @@ public Builder removeStatus(int index) { } return this; } + /** * * @@ -1386,6 +1427,7 @@ public Builder removeStatus(int index) { public com.google.rpc.Status.Builder getStatusBuilder(int index) { return getStatusFieldBuilder().getBuilder(index); } + /** * * @@ -1405,6 +1447,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder(int index) { return statusBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1424,6 +1467,7 @@ public java.util.List getStatusOrBuild return java.util.Collections.unmodifiableList(status_); } } + /** * * @@ -1439,6 +1483,7 @@ public java.util.List getStatusOrBuild public com.google.rpc.Status.Builder addStatusBuilder() { return getStatusFieldBuilder().addBuilder(com.google.rpc.Status.getDefaultInstance()); } + /** * * @@ -1454,6 +1499,7 @@ public com.google.rpc.Status.Builder addStatusBuilder() { public com.google.rpc.Status.Builder addStatusBuilder(int index) { return getStatusFieldBuilder().addBuilder(index, com.google.rpc.Status.getDefaultInstance()); } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponseOrBuilder.java index ecd1cbfcf..4b38fe034 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BatchWriteResponseOrBuilder @@ -37,6 +37,7 @@ public interface BatchWriteResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 1; */ java.util.List getWriteResultsList(); + /** * * @@ -50,6 +51,7 @@ public interface BatchWriteResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 1; */ com.google.firestore.v1.WriteResult getWriteResults(int index); + /** * * @@ -63,6 +65,7 @@ public interface BatchWriteResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 1; */ int getWriteResultsCount(); + /** * * @@ -77,6 +80,7 @@ public interface BatchWriteResponseOrBuilder */ java.util.List getWriteResultsOrBuilderList(); + /** * * @@ -104,6 +108,7 @@ public interface BatchWriteResponseOrBuilder * repeated .google.rpc.Status status = 2; */ java.util.List getStatusList(); + /** * * @@ -117,6 +122,7 @@ public interface BatchWriteResponseOrBuilder * repeated .google.rpc.Status status = 2; */ com.google.rpc.Status getStatus(int index); + /** * * @@ -130,6 +136,7 @@ public interface BatchWriteResponseOrBuilder * repeated .google.rpc.Status status = 2; */ int getStatusCount(); + /** * * @@ -143,6 +150,7 @@ public interface BatchWriteResponseOrBuilder * repeated .google.rpc.Status status = 2; */ java.util.List getStatusOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java index bff0ac024..a86aab336 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class BeginTransactionRequest extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.firestore.v1.BeginTransactionRequest) BeginTransactionRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use BeginTransactionRequest.newBuilder() to construct. private BeginTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -120,6 +123,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { public static final int OPTIONS_FIELD_NUMBER = 2; private com.google.firestore.v1.TransactionOptions options_; + /** * * @@ -136,6 +140,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { public boolean hasOptions() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -154,6 +159,7 @@ public com.google.firestore.v1.TransactionOptions getOptions() { ? com.google.firestore.v1.TransactionOptions.getDefaultInstance() : options_; } + /** * * @@ -344,6 +350,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -558,6 +565,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object database_ = ""; + /** * * @@ -581,6 +589,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -604,6 +613,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -626,6 +636,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -644,6 +655,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -674,6 +686,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.TransactionOptions.Builder, com.google.firestore.v1.TransactionOptionsOrBuilder> optionsBuilder_; + /** * * @@ -689,6 +702,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { public boolean hasOptions() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -710,6 +724,7 @@ public com.google.firestore.v1.TransactionOptions getOptions() { return optionsBuilder_.getMessage(); } } + /** * * @@ -733,6 +748,7 @@ public Builder setOptions(com.google.firestore.v1.TransactionOptions value) { onChanged(); return this; } + /** * * @@ -753,6 +769,7 @@ public Builder setOptions(com.google.firestore.v1.TransactionOptions.Builder bui onChanged(); return this; } + /** * * @@ -781,6 +798,7 @@ public Builder mergeOptions(com.google.firestore.v1.TransactionOptions value) { } return this; } + /** * * @@ -801,6 +819,7 @@ public Builder clearOptions() { onChanged(); return this; } + /** * * @@ -816,6 +835,7 @@ public com.google.firestore.v1.TransactionOptions.Builder getOptionsBuilder() { onChanged(); return getOptionsFieldBuilder().getBuilder(); } + /** * * @@ -835,6 +855,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getOptionsOrBuilder() : options_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequestOrBuilder.java index 9954b71fa..31ceadd09 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BeginTransactionRequestOrBuilder @@ -37,6 +37,7 @@ public interface BeginTransactionRequestOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -64,6 +65,7 @@ public interface BeginTransactionRequestOrBuilder * @return Whether the options field is set. */ boolean hasOptions(); + /** * * @@ -77,6 +79,7 @@ public interface BeginTransactionRequestOrBuilder * @return The options. */ com.google.firestore.v1.TransactionOptions getOptions(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java index 4a557d32b..93f8351bc 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class BeginTransactionResponse extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.firestore.v1.BeginTransactionResponse) BeginTransactionResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use BeginTransactionResponse.newBuilder() to construct. private BeginTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -66,6 +67,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int TRANSACTION_FIELD_NUMBER = 1; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -241,6 +243,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -424,6 +427,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -439,6 +443,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getTransaction() { return transaction_; } + /** * * @@ -460,6 +465,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponseOrBuilder.java index 34fa014c0..f2ecb702d 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BeginTransactionResponseOrBuilder diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequence.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequence.java index 68e649c79..f1ae4f21a 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequence.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequence.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/bloom_filter.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -47,6 +47,7 @@ public final class BitSequence extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.BitSequence) BitSequenceOrBuilder { private static final long serialVersionUID = 0L; + // Use BitSequence.newBuilder() to construct. private BitSequence(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -79,6 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int BITMAP_FIELD_NUMBER = 1; private com.google.protobuf.ByteString bitmap_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -98,6 +100,7 @@ public com.google.protobuf.ByteString getBitmap() { public static final int PADDING_FIELD_NUMBER = 2; private int padding_ = 0; + /** * * @@ -282,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -489,6 +493,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString bitmap_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -505,6 +510,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getBitmap() { return bitmap_; } + /** * * @@ -527,6 +533,7 @@ public Builder setBitmap(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -547,6 +554,7 @@ public Builder clearBitmap() { } private int padding_; + /** * * @@ -564,6 +572,7 @@ public Builder clearBitmap() { public int getPadding() { return padding_; } + /** * * @@ -585,6 +594,7 @@ public Builder setPadding(int value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequenceOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequenceOrBuilder.java index 1d64efcf2..1e8d2969e 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequenceOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequenceOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/bloom_filter.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BitSequenceOrBuilder diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilter.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilter.java index 986658fdb..a5ead284a 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilter.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilter.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/bloom_filter.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -45,6 +45,7 @@ public final class BloomFilter extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.BloomFilter) BloomFilterOrBuilder { private static final long serialVersionUID = 0L; + // Use BloomFilter.newBuilder() to construct. private BloomFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -76,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int BITS_FIELD_NUMBER = 1; private com.google.firestore.v1.BitSequence bits_; + /** * * @@ -91,6 +93,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasBits() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -106,6 +109,7 @@ public boolean hasBits() { public com.google.firestore.v1.BitSequence getBits() { return bits_ == null ? com.google.firestore.v1.BitSequence.getDefaultInstance() : bits_; } + /** * * @@ -122,6 +126,7 @@ public com.google.firestore.v1.BitSequenceOrBuilder getBitsOrBuilder() { public static final int HASH_COUNT_FIELD_NUMBER = 2; private int hashCount_ = 0; + /** * * @@ -309,6 +314,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -535,6 +541,7 @@ public Builder mergeFrom( com.google.firestore.v1.BitSequence.Builder, com.google.firestore.v1.BitSequenceOrBuilder> bitsBuilder_; + /** * * @@ -549,6 +556,7 @@ public Builder mergeFrom( public boolean hasBits() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -567,6 +575,7 @@ public com.google.firestore.v1.BitSequence getBits() { return bitsBuilder_.getMessage(); } } + /** * * @@ -589,6 +598,7 @@ public Builder setBits(com.google.firestore.v1.BitSequence value) { onChanged(); return this; } + /** * * @@ -608,6 +618,7 @@ public Builder setBits(com.google.firestore.v1.BitSequence.Builder builderForVal onChanged(); return this; } + /** * * @@ -635,6 +646,7 @@ public Builder mergeBits(com.google.firestore.v1.BitSequence value) { } return this; } + /** * * @@ -654,6 +666,7 @@ public Builder clearBits() { onChanged(); return this; } + /** * * @@ -668,6 +681,7 @@ public com.google.firestore.v1.BitSequence.Builder getBitsBuilder() { onChanged(); return getBitsFieldBuilder().getBuilder(); } + /** * * @@ -684,6 +698,7 @@ public com.google.firestore.v1.BitSequenceOrBuilder getBitsOrBuilder() { return bits_ == null ? com.google.firestore.v1.BitSequence.getDefaultInstance() : bits_; } } + /** * * @@ -711,6 +726,7 @@ public com.google.firestore.v1.BitSequenceOrBuilder getBitsOrBuilder() { } private int hashCount_; + /** * * @@ -726,6 +742,7 @@ public com.google.firestore.v1.BitSequenceOrBuilder getBitsOrBuilder() { public int getHashCount() { return hashCount_; } + /** * * @@ -745,6 +762,7 @@ public Builder setHashCount(int value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterOrBuilder.java index 4fc43f688..bb30011fc 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/bloom_filter.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface BloomFilterOrBuilder @@ -36,6 +36,7 @@ public interface BloomFilterOrBuilder * @return Whether the bits field is set. */ boolean hasBits(); + /** * * @@ -48,6 +49,7 @@ public interface BloomFilterOrBuilder * @return The bits. */ com.google.firestore.v1.BitSequence getBits(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterProto.java index 30acc15af..1ea17fdc6 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/bloom_filter.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class BloomFilterProto { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java index 96bd58d53..d1daad9e7 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class CommitRequest extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.CommitRequest) CommitRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CommitRequest.newBuilder() to construct. private CommitRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -122,6 +125,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { @SuppressWarnings("serial") private java.util.List writes_; + /** * * @@ -137,6 +141,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { public java.util.List getWritesList() { return writes_; } + /** * * @@ -152,6 +157,7 @@ public java.util.List getWritesList() { public java.util.List getWritesOrBuilderList() { return writes_; } + /** * * @@ -167,6 +173,7 @@ public java.util.List getWrite public int getWritesCount() { return writes_.size(); } + /** * * @@ -182,6 +189,7 @@ public int getWritesCount() { public com.google.firestore.v1.Write getWrites(int index) { return writes_.get(index); } + /** * * @@ -200,6 +208,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { public static final int TRANSACTION_FIELD_NUMBER = 3; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -393,6 +402,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -648,6 +658,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object database_ = ""; + /** * * @@ -671,6 +682,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -694,6 +706,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -716,6 +729,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -734,6 +748,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -792,6 +807,7 @@ public java.util.List getWritesList() { return writesBuilder_.getMessageList(); } } + /** * * @@ -810,6 +826,7 @@ public int getWritesCount() { return writesBuilder_.getCount(); } } + /** * * @@ -828,6 +845,7 @@ public com.google.firestore.v1.Write getWrites(int index) { return writesBuilder_.getMessage(index); } } + /** * * @@ -852,6 +870,7 @@ public Builder setWrites(int index, com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -873,6 +892,7 @@ public Builder setWrites(int index, com.google.firestore.v1.Write.Builder builde } return this; } + /** * * @@ -897,6 +917,7 @@ public Builder addWrites(com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -921,6 +942,7 @@ public Builder addWrites(int index, com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -942,6 +964,7 @@ public Builder addWrites(com.google.firestore.v1.Write.Builder builderForValue) } return this; } + /** * * @@ -963,6 +986,7 @@ public Builder addWrites(int index, com.google.firestore.v1.Write.Builder builde } return this; } + /** * * @@ -985,6 +1009,7 @@ public Builder addAllWrites( } return this; } + /** * * @@ -1006,6 +1031,7 @@ public Builder clearWrites() { } return this; } + /** * * @@ -1027,6 +1053,7 @@ public Builder removeWrites(int index) { } return this; } + /** * * @@ -1041,6 +1068,7 @@ public Builder removeWrites(int index) { public com.google.firestore.v1.Write.Builder getWritesBuilder(int index) { return getWritesFieldBuilder().getBuilder(index); } + /** * * @@ -1059,6 +1087,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return writesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1078,6 +1107,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return java.util.Collections.unmodifiableList(writes_); } } + /** * * @@ -1092,6 +1122,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { public com.google.firestore.v1.Write.Builder addWritesBuilder() { return getWritesFieldBuilder().addBuilder(com.google.firestore.v1.Write.getDefaultInstance()); } + /** * * @@ -1107,6 +1138,7 @@ public com.google.firestore.v1.Write.Builder addWritesBuilder(int index) { return getWritesFieldBuilder() .addBuilder(index, com.google.firestore.v1.Write.getDefaultInstance()); } + /** * * @@ -1140,6 +1172,7 @@ public java.util.List getWritesBuilderLis } private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1155,6 +1188,7 @@ public java.util.List getWritesBuilderLis public com.google.protobuf.ByteString getTransaction() { return transaction_; } + /** * * @@ -1176,6 +1210,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequestOrBuilder.java index 3cf5b5d72..22e6debf3 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface CommitRequestOrBuilder @@ -37,6 +37,7 @@ public interface CommitRequestOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -63,6 +64,7 @@ public interface CommitRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ java.util.List getWritesList(); + /** * * @@ -75,6 +77,7 @@ public interface CommitRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ com.google.firestore.v1.Write getWrites(int index); + /** * * @@ -87,6 +90,7 @@ public interface CommitRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ int getWritesCount(); + /** * * @@ -99,6 +103,7 @@ public interface CommitRequestOrBuilder * repeated .google.firestore.v1.Write writes = 2; */ java.util.List getWritesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java index 0de7295b5..e364a3779 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class CommitResponse extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.CommitResponse) CommitResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use CommitResponse.newBuilder() to construct. private CommitResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List writeResults_; + /** * * @@ -84,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getWriteResultsList() { return writeResults_; } + /** * * @@ -101,6 +104,7 @@ public java.util.List getWriteResultsList() getWriteResultsOrBuilderList() { return writeResults_; } + /** * * @@ -117,6 +121,7 @@ public java.util.List getWriteResultsList() public int getWriteResultsCount() { return writeResults_.size(); } + /** * * @@ -133,6 +138,7 @@ public int getWriteResultsCount() { public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResults_.get(index); } + /** * * @@ -152,6 +158,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int public static final int COMMIT_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp commitTime_; + /** * * @@ -168,6 +175,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int public boolean hasCommitTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -184,6 +192,7 @@ public boolean hasCommitTime() { public com.google.protobuf.Timestamp getCommitTime() { return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; } + /** * * @@ -373,6 +382,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -665,6 +675,7 @@ public java.util.List getWriteResultsList() return writeResultsBuilder_.getMessageList(); } } + /** * * @@ -684,6 +695,7 @@ public int getWriteResultsCount() { return writeResultsBuilder_.getCount(); } } + /** * * @@ -703,6 +715,7 @@ public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResultsBuilder_.getMessage(index); } } + /** * * @@ -728,6 +741,7 @@ public Builder setWriteResults(int index, com.google.firestore.v1.WriteResult va } return this; } + /** * * @@ -751,6 +765,7 @@ public Builder setWriteResults( } return this; } + /** * * @@ -776,6 +791,7 @@ public Builder addWriteResults(com.google.firestore.v1.WriteResult value) { } return this; } + /** * * @@ -801,6 +817,7 @@ public Builder addWriteResults(int index, com.google.firestore.v1.WriteResult va } return this; } + /** * * @@ -823,6 +840,7 @@ public Builder addWriteResults(com.google.firestore.v1.WriteResult.Builder build } return this; } + /** * * @@ -846,6 +864,7 @@ public Builder addWriteResults( } return this; } + /** * * @@ -869,6 +888,7 @@ public Builder addAllWriteResults( } return this; } + /** * * @@ -891,6 +911,7 @@ public Builder clearWriteResults() { } return this; } + /** * * @@ -913,6 +934,7 @@ public Builder removeWriteResults(int index) { } return this; } + /** * * @@ -928,6 +950,7 @@ public Builder removeWriteResults(int index) { public com.google.firestore.v1.WriteResult.Builder getWriteResultsBuilder(int index) { return getWriteResultsFieldBuilder().getBuilder(index); } + /** * * @@ -947,6 +970,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int return writeResultsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -967,6 +991,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int return java.util.Collections.unmodifiableList(writeResults_); } } + /** * * @@ -983,6 +1008,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder() { return getWriteResultsFieldBuilder() .addBuilder(com.google.firestore.v1.WriteResult.getDefaultInstance()); } + /** * * @@ -999,6 +1025,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int in return getWriteResultsFieldBuilder() .addBuilder(index, com.google.firestore.v1.WriteResult.getDefaultInstance()); } + /** * * @@ -1039,6 +1066,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int in com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> commitTimeBuilder_; + /** * * @@ -1054,6 +1082,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int in public boolean hasCommitTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1075,6 +1104,7 @@ public com.google.protobuf.Timestamp getCommitTime() { return commitTimeBuilder_.getMessage(); } } + /** * * @@ -1098,6 +1128,7 @@ public Builder setCommitTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1118,6 +1149,7 @@ public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1146,6 +1178,7 @@ public Builder mergeCommitTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1166,6 +1199,7 @@ public Builder clearCommitTime() { onChanged(); return this; } + /** * * @@ -1181,6 +1215,7 @@ public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() { onChanged(); return getCommitTimeFieldBuilder().getBuilder(); } + /** * * @@ -1200,6 +1235,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { : commitTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponseOrBuilder.java index ce65453e2..d77c15733 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface CommitResponseOrBuilder @@ -37,6 +37,7 @@ public interface CommitResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 1; */ java.util.List getWriteResultsList(); + /** * * @@ -50,6 +51,7 @@ public interface CommitResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 1; */ com.google.firestore.v1.WriteResult getWriteResults(int index); + /** * * @@ -63,6 +65,7 @@ public interface CommitResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 1; */ int getWriteResultsCount(); + /** * * @@ -77,6 +80,7 @@ public interface CommitResponseOrBuilder */ java.util.List getWriteResultsOrBuilderList(); + /** * * @@ -104,6 +108,7 @@ public interface CommitResponseOrBuilder * @return Whether the commitTime field is set. */ boolean hasCommitTime(); + /** * * @@ -117,6 +122,7 @@ public interface CommitResponseOrBuilder * @return The commitTime. */ com.google.protobuf.Timestamp getCommitTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.java index 1dfc0fc7d..413907244 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class CommonProto { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java index c5a64a68d..53d141e4a 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class CreateDocumentRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.v1.CreateDocumentRequest) CreateDocumentRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateDocumentRequest.newBuilder() to construct. private CreateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object collectionId_ = ""; + /** * * @@ -150,6 +154,7 @@ public java.lang.String getCollectionId() { return s; } } + /** * * @@ -179,6 +184,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object documentId_ = ""; + /** * * @@ -204,6 +210,7 @@ public java.lang.String getDocumentId() { return s; } } + /** * * @@ -232,6 +239,7 @@ public com.google.protobuf.ByteString getDocumentIdBytes() { public static final int DOCUMENT_FIELD_NUMBER = 4; private com.google.firestore.v1.Document document_; + /** * * @@ -248,6 +256,7 @@ public com.google.protobuf.ByteString getDocumentIdBytes() { public boolean hasDocument() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -264,6 +273,7 @@ public boolean hasDocument() { public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } + /** * * @@ -281,6 +291,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public static final int MASK_FIELD_NUMBER = 5; private com.google.firestore.v1.DocumentMask mask_; + /** * * @@ -299,6 +310,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public boolean hasMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -317,6 +329,7 @@ public boolean hasMask() { public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } + /** * * @@ -539,6 +552,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -801,6 +815,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -825,6 +840,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -849,6 +865,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -872,6 +889,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -891,6 +909,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -917,6 +936,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object collectionId_ = ""; + /** * * @@ -940,6 +960,7 @@ public java.lang.String getCollectionId() { return (java.lang.String) ref; } } + /** * * @@ -963,6 +984,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -985,6 +1007,7 @@ public Builder setCollectionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1003,6 +1026,7 @@ public Builder clearCollectionId() { onChanged(); return this; } + /** * * @@ -1028,6 +1052,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object documentId_ = ""; + /** * * @@ -1052,6 +1077,7 @@ public java.lang.String getDocumentId() { return (java.lang.String) ref; } } + /** * * @@ -1076,6 +1102,7 @@ public com.google.protobuf.ByteString getDocumentIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1099,6 +1126,7 @@ public Builder setDocumentId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1118,6 +1146,7 @@ public Builder clearDocumentId() { onChanged(); return this; } + /** * * @@ -1149,6 +1178,7 @@ public Builder setDocumentIdBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.Document.Builder, com.google.firestore.v1.DocumentOrBuilder> documentBuilder_; + /** * * @@ -1164,6 +1194,7 @@ public Builder setDocumentIdBytes(com.google.protobuf.ByteString value) { public boolean hasDocument() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1185,6 +1216,7 @@ public com.google.firestore.v1.Document getDocument() { return documentBuilder_.getMessage(); } } + /** * * @@ -1208,6 +1240,7 @@ public Builder setDocument(com.google.firestore.v1.Document value) { onChanged(); return this; } + /** * * @@ -1228,6 +1261,7 @@ public Builder setDocument(com.google.firestore.v1.Document.Builder builderForVa onChanged(); return this; } + /** * * @@ -1256,6 +1290,7 @@ public Builder mergeDocument(com.google.firestore.v1.Document value) { } return this; } + /** * * @@ -1276,6 +1311,7 @@ public Builder clearDocument() { onChanged(); return this; } + /** * * @@ -1291,6 +1327,7 @@ public com.google.firestore.v1.Document.Builder getDocumentBuilder() { onChanged(); return getDocumentFieldBuilder().getBuilder(); } + /** * * @@ -1310,6 +1347,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { : document_; } } + /** * * @@ -1343,6 +1381,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { com.google.firestore.v1.DocumentMask.Builder, com.google.firestore.v1.DocumentMaskOrBuilder> maskBuilder_; + /** * * @@ -1360,6 +1399,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public boolean hasMask() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1381,6 +1421,7 @@ public com.google.firestore.v1.DocumentMask getMask() { return maskBuilder_.getMessage(); } } + /** * * @@ -1406,6 +1447,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask value) { onChanged(); return this; } + /** * * @@ -1428,6 +1470,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask.Builder builderForVa onChanged(); return this; } + /** * * @@ -1458,6 +1501,7 @@ public Builder mergeMask(com.google.firestore.v1.DocumentMask value) { } return this; } + /** * * @@ -1480,6 +1524,7 @@ public Builder clearMask() { onChanged(); return this; } + /** * * @@ -1497,6 +1542,7 @@ public com.google.firestore.v1.DocumentMask.Builder getMaskBuilder() { onChanged(); return getMaskFieldBuilder().getBuilder(); } + /** * * @@ -1516,6 +1562,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequestOrBuilder.java index 858d71b9f..e7ac5c041 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface CreateDocumentRequestOrBuilder @@ -38,6 +38,7 @@ public interface CreateDocumentRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -66,6 +67,7 @@ public interface CreateDocumentRequestOrBuilder * @return The collectionId. */ java.lang.String getCollectionId(); + /** * * @@ -94,6 +96,7 @@ public interface CreateDocumentRequestOrBuilder * @return The documentId. */ java.lang.String getDocumentId(); + /** * * @@ -122,6 +125,7 @@ public interface CreateDocumentRequestOrBuilder * @return Whether the document field is set. */ boolean hasDocument(); + /** * * @@ -135,6 +139,7 @@ public interface CreateDocumentRequestOrBuilder * @return The document. */ com.google.firestore.v1.Document getDocument(); + /** * * @@ -162,6 +167,7 @@ public interface CreateDocumentRequestOrBuilder * @return Whether the mask field is set. */ boolean hasMask(); + /** * * @@ -177,6 +183,7 @@ public interface CreateDocumentRequestOrBuilder * @return The mask. */ com.google.firestore.v1.DocumentMask getMask(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java index 9a5b69485..f4ded24d8 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class Cursor extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.Cursor) CursorOrBuilder { private static final long serialVersionUID = 0L; + // Use Cursor.newBuilder() to construct. private Cursor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List values_; + /** * * @@ -81,6 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getValuesList() { return values_; } + /** * * @@ -97,6 +100,7 @@ public java.util.List getValuesList() { public java.util.List getValuesOrBuilderList() { return values_; } + /** * * @@ -113,6 +117,7 @@ public java.util.List getValue public int getValuesCount() { return values_.size(); } + /** * * @@ -129,6 +134,7 @@ public int getValuesCount() { public com.google.firestore.v1.Value getValues(int index) { return values_.get(index); } + /** * * @@ -148,6 +154,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { public static final int BEFORE_FIELD_NUMBER = 2; private boolean before_ = false; + /** * * @@ -333,6 +340,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -605,6 +613,7 @@ public java.util.List getValuesList() { return valuesBuilder_.getMessageList(); } } + /** * * @@ -624,6 +633,7 @@ public int getValuesCount() { return valuesBuilder_.getCount(); } } + /** * * @@ -643,6 +653,7 @@ public com.google.firestore.v1.Value getValues(int index) { return valuesBuilder_.getMessage(index); } } + /** * * @@ -668,6 +679,7 @@ public Builder setValues(int index, com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -690,6 +702,7 @@ public Builder setValues(int index, com.google.firestore.v1.Value.Builder builde } return this; } + /** * * @@ -715,6 +728,7 @@ public Builder addValues(com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -740,6 +754,7 @@ public Builder addValues(int index, com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -762,6 +777,7 @@ public Builder addValues(com.google.firestore.v1.Value.Builder builderForValue) } return this; } + /** * * @@ -784,6 +800,7 @@ public Builder addValues(int index, com.google.firestore.v1.Value.Builder builde } return this; } + /** * * @@ -807,6 +824,7 @@ public Builder addAllValues( } return this; } + /** * * @@ -829,6 +847,7 @@ public Builder clearValues() { } return this; } + /** * * @@ -851,6 +870,7 @@ public Builder removeValues(int index) { } return this; } + /** * * @@ -866,6 +886,7 @@ public Builder removeValues(int index) { public com.google.firestore.v1.Value.Builder getValuesBuilder(int index) { return getValuesFieldBuilder().getBuilder(index); } + /** * * @@ -885,6 +906,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { return valuesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -905,6 +927,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { return java.util.Collections.unmodifiableList(values_); } } + /** * * @@ -920,6 +943,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { public com.google.firestore.v1.Value.Builder addValuesBuilder() { return getValuesFieldBuilder().addBuilder(com.google.firestore.v1.Value.getDefaultInstance()); } + /** * * @@ -936,6 +960,7 @@ public com.google.firestore.v1.Value.Builder addValuesBuilder(int index) { return getValuesFieldBuilder() .addBuilder(index, com.google.firestore.v1.Value.getDefaultInstance()); } + /** * * @@ -970,6 +995,7 @@ public java.util.List getValuesBuilderLis } private boolean before_; + /** * * @@ -986,6 +1012,7 @@ public java.util.List getValuesBuilderLis public boolean getBefore() { return before_; } + /** * * @@ -1006,6 +1033,7 @@ public Builder setBefore(boolean value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CursorOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CursorOrBuilder.java index 14aaf3952..399ffceca 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CursorOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CursorOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface CursorOrBuilder @@ -37,6 +37,7 @@ public interface CursorOrBuilder * repeated .google.firestore.v1.Value values = 1; */ java.util.List getValuesList(); + /** * * @@ -50,6 +51,7 @@ public interface CursorOrBuilder * repeated .google.firestore.v1.Value values = 1; */ com.google.firestore.v1.Value getValues(int index); + /** * * @@ -63,6 +65,7 @@ public interface CursorOrBuilder * repeated .google.firestore.v1.Value values = 1; */ int getValuesCount(); + /** * * @@ -76,6 +79,7 @@ public interface CursorOrBuilder * repeated .google.firestore.v1.Value values = 1; */ java.util.List getValuesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java index 9d204027a..c8e45e8bb 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class DeleteDocumentRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.v1.DeleteDocumentRequest) DeleteDocumentRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteDocumentRequest.newBuilder() to construct. private DeleteDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -120,6 +123,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int CURRENT_DOCUMENT_FIELD_NUMBER = 2; private com.google.firestore.v1.Precondition currentDocument_; + /** * * @@ -136,6 +140,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasCurrentDocument() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -154,6 +159,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { ? com.google.firestore.v1.Precondition.getDefaultInstance() : currentDocument_; } + /** * * @@ -344,6 +350,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -558,6 +565,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -581,6 +589,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -604,6 +613,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -626,6 +636,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -644,6 +655,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -674,6 +686,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.Precondition.Builder, com.google.firestore.v1.PreconditionOrBuilder> currentDocumentBuilder_; + /** * * @@ -689,6 +702,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasCurrentDocument() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -710,6 +724,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { return currentDocumentBuilder_.getMessage(); } } + /** * * @@ -733,6 +748,7 @@ public Builder setCurrentDocument(com.google.firestore.v1.Precondition value) { onChanged(); return this; } + /** * * @@ -754,6 +770,7 @@ public Builder setCurrentDocument( onChanged(); return this; } + /** * * @@ -782,6 +799,7 @@ public Builder mergeCurrentDocument(com.google.firestore.v1.Precondition value) } return this; } + /** * * @@ -802,6 +820,7 @@ public Builder clearCurrentDocument() { onChanged(); return this; } + /** * * @@ -817,6 +836,7 @@ public com.google.firestore.v1.Precondition.Builder getCurrentDocumentBuilder() onChanged(); return getCurrentDocumentFieldBuilder().getBuilder(); } + /** * * @@ -836,6 +856,7 @@ public com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder : currentDocument_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequestOrBuilder.java index fb6494588..8075000fa 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface DeleteDocumentRequestOrBuilder @@ -37,6 +37,7 @@ public interface DeleteDocumentRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -64,6 +65,7 @@ public interface DeleteDocumentRequestOrBuilder * @return Whether the currentDocument field is set. */ boolean hasCurrentDocument(); + /** * * @@ -77,6 +79,7 @@ public interface DeleteDocumentRequestOrBuilder * @return The currentDocument. */ com.google.firestore.v1.Precondition getCurrentDocument(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java index 8ff0edd39..04896d144 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -35,6 +35,7 @@ public final class Document extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.Document) DocumentOrBuilder { private static final long serialVersionUID = 0L; + // Use Document.newBuilder() to construct. private Document(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -105,6 +107,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -159,6 +162,7 @@ private static final class FieldsDefaultEntryHolder { public int getFieldsCount() { return internalGetFields().getMap().size(); } + /** * * @@ -198,12 +202,14 @@ public boolean containsFields(java.lang.String key) { } return internalGetFields().getMap().containsKey(key); } + /** Use {@link #getFieldsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); } + /** * * @@ -240,6 +246,7 @@ public java.util.Map getFields( public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } + /** * * @@ -284,6 +291,7 @@ public java.util.Map getFieldsM internalGetFields().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -331,6 +339,7 @@ public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) { public static final int CREATE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp createTime_; + /** * * @@ -350,6 +359,7 @@ public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) { public boolean hasCreateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -369,6 +379,7 @@ public boolean hasCreateTime() { public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + /** * * @@ -389,6 +400,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int UPDATE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp updateTime_; + /** * * @@ -408,6 +420,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasUpdateTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -427,6 +440,7 @@ public boolean hasUpdateTime() { public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } + /** * * @@ -647,6 +661,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -920,6 +935,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -943,6 +959,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -966,6 +983,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -988,6 +1006,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1006,6 +1025,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1048,7 +1068,8 @@ public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilde defaultEntry() { return FieldsDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final FieldsConverter fieldsConverter = new FieldsConverter(); @@ -1088,6 +1109,7 @@ public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilde public int getFieldsCount() { return internalGetFields().ensureBuilderMap().size(); } + /** * * @@ -1127,12 +1149,14 @@ public boolean containsFields(java.lang.String key) { } return internalGetFields().ensureBuilderMap().containsKey(key); } + /** Use {@link #getFieldsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); } + /** * * @@ -1169,6 +1193,7 @@ public java.util.Map getFields( public java.util.Map getFieldsMap() { return internalGetFields().getImmutableMap(); } + /** * * @@ -1213,6 +1238,7 @@ public java.util.Map getFieldsM internalGetMutableFields().ensureBuilderMap(); return map.containsKey(key) ? fieldsConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -1263,6 +1289,7 @@ public Builder clearFields() { internalGetMutableFields().clear(); return this; } + /** * * @@ -1302,12 +1329,14 @@ public Builder removeFields(java.lang.String key) { internalGetMutableFields().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableFields() { bitField0_ |= 0x00000002; return internalGetMutableFields().ensureMessageMap(); } + /** * * @@ -1351,6 +1380,7 @@ public Builder putFields(java.lang.String key, com.google.firestore.v1.Value val bitField0_ |= 0x00000002; return this; } + /** * * @@ -1395,6 +1425,7 @@ public Builder putAllFields( bitField0_ |= 0x00000002; return this; } + /** * * @@ -1448,6 +1479,7 @@ public com.google.firestore.v1.Value.Builder putFieldsBuilderIfAbsent(java.lang. com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** * * @@ -1466,6 +1498,7 @@ public com.google.firestore.v1.Value.Builder putFieldsBuilderIfAbsent(java.lang. public boolean hasCreateTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1490,6 +1523,7 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTimeBuilder_.getMessage(); } } + /** * * @@ -1516,6 +1550,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1539,6 +1574,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1570,6 +1606,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1593,6 +1630,7 @@ public Builder clearCreateTime() { onChanged(); return this; } + /** * * @@ -1611,6 +1649,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } + /** * * @@ -1633,6 +1672,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { : createTime_; } } + /** * * @@ -1669,6 +1709,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** * * @@ -1687,6 +1728,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasUpdateTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1711,6 +1753,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { return updateTimeBuilder_.getMessage(); } } + /** * * @@ -1737,6 +1780,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1760,6 +1804,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1791,6 +1836,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1814,6 +1860,7 @@ public Builder clearUpdateTime() { onChanged(); return this; } + /** * * @@ -1832,6 +1879,7 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } + /** * * @@ -1854,6 +1902,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { : updateTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java index 482cc0723..c858edbd9 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -40,6 +40,7 @@ public final class DocumentChange extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.DocumentChange) DocumentChangeOrBuilder { private static final long serialVersionUID = 0L; + // Use DocumentChange.newBuilder() to construct. private DocumentChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -74,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int DOCUMENT_FIELD_NUMBER = 1; private com.google.firestore.v1.Document document_; + /** * * @@ -91,6 +93,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasDocument() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -108,6 +111,7 @@ public boolean hasDocument() { public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } + /** * * @@ -128,6 +132,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList targetIds_ = emptyIntList(); + /** * * @@ -143,6 +148,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public java.util.List getTargetIdsList() { return targetIds_; } + /** * * @@ -157,6 +163,7 @@ public java.util.List getTargetIdsList() { public int getTargetIdsCount() { return targetIds_.size(); } + /** * * @@ -179,6 +186,7 @@ public int getTargetIds(int index) { @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList removedTargetIds_ = emptyIntList(); + /** * * @@ -194,6 +202,7 @@ public int getTargetIds(int index) { public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } + /** * * @@ -208,6 +217,7 @@ public java.util.List getRemovedTargetIdsList() { public int getRemovedTargetIdsCount() { return removedTargetIds_.size(); } + /** * * @@ -441,6 +451,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -718,6 +729,7 @@ public Builder mergeFrom( com.google.firestore.v1.Document.Builder, com.google.firestore.v1.DocumentOrBuilder> documentBuilder_; + /** * * @@ -734,6 +746,7 @@ public Builder mergeFrom( public boolean hasDocument() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -756,6 +769,7 @@ public com.google.firestore.v1.Document getDocument() { return documentBuilder_.getMessage(); } } + /** * * @@ -780,6 +794,7 @@ public Builder setDocument(com.google.firestore.v1.Document value) { onChanged(); return this; } + /** * * @@ -801,6 +816,7 @@ public Builder setDocument(com.google.firestore.v1.Document.Builder builderForVa onChanged(); return this; } + /** * * @@ -830,6 +846,7 @@ public Builder mergeDocument(com.google.firestore.v1.Document value) { } return this; } + /** * * @@ -851,6 +868,7 @@ public Builder clearDocument() { onChanged(); return this; } + /** * * @@ -867,6 +885,7 @@ public com.google.firestore.v1.Document.Builder getDocumentBuilder() { onChanged(); return getDocumentFieldBuilder().getBuilder(); } + /** * * @@ -887,6 +906,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { : document_; } } + /** * * @@ -923,6 +943,7 @@ private void ensureTargetIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -938,6 +959,7 @@ public java.util.List getTargetIdsList() { targetIds_.makeImmutable(); return targetIds_; } + /** * * @@ -952,6 +974,7 @@ public java.util.List getTargetIdsList() { public int getTargetIdsCount() { return targetIds_.size(); } + /** * * @@ -967,6 +990,7 @@ public int getTargetIdsCount() { public int getTargetIds(int index) { return targetIds_.getInt(index); } + /** * * @@ -988,6 +1012,7 @@ public Builder setTargetIds(int index, int value) { onChanged(); return this; } + /** * * @@ -1008,6 +1033,7 @@ public Builder addTargetIds(int value) { onChanged(); return this; } + /** * * @@ -1027,6 +1053,7 @@ public Builder addAllTargetIds(java.lang.Iterable v onChanged(); return this; } + /** * * @@ -1053,6 +1080,7 @@ private void ensureRemovedTargetIdsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * @@ -1068,6 +1096,7 @@ public java.util.List getRemovedTargetIdsList() { removedTargetIds_.makeImmutable(); return removedTargetIds_; } + /** * * @@ -1082,6 +1111,7 @@ public java.util.List getRemovedTargetIdsList() { public int getRemovedTargetIdsCount() { return removedTargetIds_.size(); } + /** * * @@ -1097,6 +1127,7 @@ public int getRemovedTargetIdsCount() { public int getRemovedTargetIds(int index) { return removedTargetIds_.getInt(index); } + /** * * @@ -1118,6 +1149,7 @@ public Builder setRemovedTargetIds(int index, int value) { onChanged(); return this; } + /** * * @@ -1138,6 +1170,7 @@ public Builder addRemovedTargetIds(int value) { onChanged(); return this; } + /** * * @@ -1157,6 +1190,7 @@ public Builder addAllRemovedTargetIds(java.lang.Iterable getTargetIdsList(); + /** * * @@ -89,6 +92,7 @@ public interface DocumentChangeOrBuilder * @return The count of targetIds. */ int getTargetIdsCount(); + /** * * @@ -115,6 +119,7 @@ public interface DocumentChangeOrBuilder * @return A list containing the removedTargetIds. */ java.util.List getRemovedTargetIdsList(); + /** * * @@ -127,6 +132,7 @@ public interface DocumentChangeOrBuilder * @return The count of removedTargetIds. */ int getRemovedTargetIdsCount(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java index 1e307774e..7a9893d50 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -40,6 +40,7 @@ public final class DocumentDelete extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.DocumentDelete) DocumentDeleteOrBuilder { private static final long serialVersionUID = 0L; + // Use DocumentDelete.newBuilder() to construct. private DocumentDelete(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -76,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object document_ = ""; + /** * * @@ -100,6 +102,7 @@ public java.lang.String getDocument() { return s; } } + /** * * @@ -129,6 +132,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList removedTargetIds_ = emptyIntList(); + /** * * @@ -144,6 +148,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } + /** * * @@ -158,6 +163,7 @@ public java.util.List getRemovedTargetIdsList() { public int getRemovedTargetIdsCount() { return removedTargetIds_.size(); } + /** * * @@ -178,6 +184,7 @@ public int getRemovedTargetIds(int index) { public static final int READ_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -195,6 +202,7 @@ public int getRemovedTargetIds(int index) { public boolean hasReadTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -212,6 +220,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -427,6 +436,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -680,6 +690,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object document_ = ""; + /** * * @@ -703,6 +714,7 @@ public java.lang.String getDocument() { return (java.lang.String) ref; } } + /** * * @@ -726,6 +738,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -748,6 +761,7 @@ public Builder setDocument(java.lang.String value) { onChanged(); return this; } + /** * * @@ -766,6 +780,7 @@ public Builder clearDocument() { onChanged(); return this; } + /** * * @@ -798,6 +813,7 @@ private void ensureRemovedTargetIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -813,6 +829,7 @@ public java.util.List getRemovedTargetIdsList() { removedTargetIds_.makeImmutable(); return removedTargetIds_; } + /** * * @@ -827,6 +844,7 @@ public java.util.List getRemovedTargetIdsList() { public int getRemovedTargetIdsCount() { return removedTargetIds_.size(); } + /** * * @@ -842,6 +860,7 @@ public int getRemovedTargetIdsCount() { public int getRemovedTargetIds(int index) { return removedTargetIds_.getInt(index); } + /** * * @@ -863,6 +882,7 @@ public Builder setRemovedTargetIds(int index, int value) { onChanged(); return this; } + /** * * @@ -883,6 +903,7 @@ public Builder addRemovedTargetIds(int value) { onChanged(); return this; } + /** * * @@ -902,6 +923,7 @@ public Builder addAllRemovedTargetIds(java.lang.Iterable readTimeBuilder_; + /** * * @@ -942,6 +965,7 @@ public Builder clearRemovedTargetIds() { public boolean hasReadTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -962,6 +986,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -986,6 +1011,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1007,6 +1033,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -1036,6 +1063,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1057,6 +1085,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -1073,6 +1102,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1091,6 +1121,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java index 58d03a61f..f094f059f 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface DocumentDeleteOrBuilder @@ -37,6 +37,7 @@ public interface DocumentDeleteOrBuilder * @return The document. */ java.lang.String getDocument(); + /** * * @@ -63,6 +64,7 @@ public interface DocumentDeleteOrBuilder * @return A list containing the removedTargetIds. */ java.util.List getRemovedTargetIdsList(); + /** * * @@ -75,6 +77,7 @@ public interface DocumentDeleteOrBuilder * @return The count of removedTargetIds. */ int getRemovedTargetIdsCount(); + /** * * @@ -103,6 +106,7 @@ public interface DocumentDeleteOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -117,6 +121,7 @@ public interface DocumentDeleteOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.java index c627aa6c1..75d92a7c4 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -38,6 +38,7 @@ public final class DocumentMask extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.DocumentMask) DocumentMaskOrBuilder { private static final long serialVersionUID = 0L; + // Use DocumentMask.newBuilder() to construct. private DocumentMask(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -73,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList fieldPaths_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -89,6 +91,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getFieldPathsList() { return fieldPaths_; } + /** * * @@ -105,6 +108,7 @@ public com.google.protobuf.ProtocolStringList getFieldPathsList() { public int getFieldPathsCount() { return fieldPaths_.size(); } + /** * * @@ -122,6 +126,7 @@ public int getFieldPathsCount() { public java.lang.String getFieldPaths(int index) { return fieldPaths_.get(index); } + /** * * @@ -304,6 +309,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -506,6 +512,7 @@ private void ensureFieldPathsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -523,6 +530,7 @@ public com.google.protobuf.ProtocolStringList getFieldPathsList() { fieldPaths_.makeImmutable(); return fieldPaths_; } + /** * * @@ -539,6 +547,7 @@ public com.google.protobuf.ProtocolStringList getFieldPathsList() { public int getFieldPathsCount() { return fieldPaths_.size(); } + /** * * @@ -556,6 +565,7 @@ public int getFieldPathsCount() { public java.lang.String getFieldPaths(int index) { return fieldPaths_.get(index); } + /** * * @@ -573,6 +583,7 @@ public java.lang.String getFieldPaths(int index) { public com.google.protobuf.ByteString getFieldPathsBytes(int index) { return fieldPaths_.getByteString(index); } + /** * * @@ -598,6 +609,7 @@ public Builder setFieldPaths(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -622,6 +634,7 @@ public Builder addFieldPaths(java.lang.String value) { onChanged(); return this; } + /** * * @@ -643,6 +656,7 @@ public Builder addAllFieldPaths(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -663,6 +677,7 @@ public Builder clearFieldPaths() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java index b36e4924e..982c5dc3c 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface DocumentMaskOrBuilder @@ -38,6 +38,7 @@ public interface DocumentMaskOrBuilder * @return A list containing the fieldPaths. */ java.util.List getFieldPathsList(); + /** * * @@ -52,6 +53,7 @@ public interface DocumentMaskOrBuilder * @return The count of fieldPaths. */ int getFieldPathsCount(); + /** * * @@ -67,6 +69,7 @@ public interface DocumentMaskOrBuilder * @return The fieldPaths at the given index. */ java.lang.String getFieldPaths(int index); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.java index 57d52cd65..23a5d24b0 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface DocumentOrBuilder @@ -37,6 +37,7 @@ public interface DocumentOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -84,6 +85,7 @@ public interface DocumentOrBuilder * map<string, .google.firestore.v1.Value> fields = 2; */ int getFieldsCount(); + /** * * @@ -117,9 +119,11 @@ public interface DocumentOrBuilder * map<string, .google.firestore.v1.Value> fields = 2; */ boolean containsFields(java.lang.String key); + /** Use {@link #getFieldsMap()} instead. */ @java.lang.Deprecated java.util.Map getFields(); + /** * * @@ -153,6 +157,7 @@ public interface DocumentOrBuilder * map<string, .google.firestore.v1.Value> fields = 2; */ java.util.Map getFieldsMap(); + /** * * @@ -190,6 +195,7 @@ com.google.firestore.v1.Value getFieldsOrDefault( java.lang.String key, /* nullable */ com.google.firestore.v1.Value defaultValue); + /** * * @@ -240,6 +246,7 @@ com.google.firestore.v1.Value getFieldsOrDefault( * @return Whether the createTime field is set. */ boolean hasCreateTime(); + /** * * @@ -256,6 +263,7 @@ com.google.firestore.v1.Value getFieldsOrDefault( * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); + /** * * @@ -287,6 +295,7 @@ com.google.firestore.v1.Value getFieldsOrDefault( * @return Whether the updateTime field is set. */ boolean hasUpdateTime(); + /** * * @@ -303,6 +312,7 @@ com.google.firestore.v1.Value getFieldsOrDefault( * @return The updateTime. */ com.google.protobuf.Timestamp getUpdateTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java index 10406e278..cdf3dea16 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class DocumentProto { @@ -52,6 +52,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1_MapValue_FieldsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_MapValue_FieldsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_Function_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_Function_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_Function_OptionsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_Function_OptionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_Pipeline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_Pipeline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_Pipeline_Stage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_Pipeline_Stage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_Pipeline_Stage_OptionsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_Pipeline_Stage_OptionsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -71,8 +91,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\003 \001(\0132\032.google.protobuf.Timestamp\022/\n\013up" + "date_time\030\004 \001(\0132\032.google.protobuf.Timest" + "amp\032I\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value" - + "\030\002 \001(\0132\032.google.firestore.v1.Value:\0028\001\"\256" - + "\003\n\005Value\0220\n\nnull_value\030\013 \001(\0162\032.google.pr" + + "\030\002 \001(\0132\032.google.firestore.v1.Value:\0028\001\"\301" + + "\004\n\005Value\0220\n\nnull_value\030\013 \001(\0162\032.google.pr" + "otobuf.NullValueH\000\022\027\n\rboolean_value\030\001 \001(" + "\010H\000\022\027\n\rinteger_value\030\002 \001(\003H\000\022\026\n\014double_v" + "alue\030\003 \001(\001H\000\0225\n\017timestamp_value\030\n \001(\0132\032." @@ -82,18 +102,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\010 \001(\0132\023.google.type.LatLngH\000\0226\n\013array_v" + "alue\030\t \001(\0132\037.google.firestore.v1.ArrayVa" + "lueH\000\0222\n\tmap_value\030\006 \001(\0132\035.google.firest" - + "ore.v1.MapValueH\000B\014\n\nvalue_type\"8\n\nArray" - + "Value\022*\n\006values\030\001 \003(\0132\032.google.firestore" - + ".v1.Value\"\220\001\n\010MapValue\0229\n\006fields\030\001 \003(\0132)" - + ".google.firestore.v1.MapValue.FieldsEntr" - + "y\032I\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002" - + " \001(\0132\032.google.firestore.v1.Value:\0028\001B\305\001\n" - + "\027com.google.firestore.v1B\rDocumentProtoP" - + "\001Z;cloud.google.com/go/firestore/apiv1/f" - + "irestorepb;firestorepb\242\002\004GCFS\252\002\031Google.C" - + "loud.Firestore.V1\312\002\031Google\\Cloud\\Firesto" - + "re\\V1\352\002\034Google::Cloud::Firestore::V1b\006pr" - + "oto3" + + "ore.v1.MapValueH\000\022\037\n\025field_reference_val" + + "ue\030\023 \001(\tH\000\0227\n\016function_value\030\024 \001(\0132\035.goo" + + "gle.firestore.v1.FunctionH\000\0227\n\016pipeline_" + + "value\030\025 \001(\0132\035.google.firestore.v1.Pipeli" + + "neH\000B\014\n\nvalue_type\"8\n\nArrayValue\022*\n\006valu" + + "es\030\001 \003(\0132\032.google.firestore.v1.Value\"\220\001\n" + + "\010MapValue\0229\n\006fields\030\001 \003(\0132).google.fires" + + "tore.v1.MapValue.FieldsEntry\032I\n\013FieldsEn" + + "try\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google" + + ".firestore.v1.Value:\0028\001\"\332\001\n\010Function\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\002\022-\n\004args\030\002 \003(\0132\032.google.f" + + "irestore.v1.ValueB\003\340A\001\022@\n\007options\030\003 \003(\0132" + + "*.google.firestore.v1.Function.OptionsEn" + + "tryB\003\340A\001\032J\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022)\n" + + "\005value\030\002 \001(\0132\032.google.firestore.v1.Value" + + ":\0028\001\"\244\002\n\010Pipeline\0228\n\006stages\030\001 \003(\0132#.goog" + + "le.firestore.v1.Pipeline.StageB\003\340A\002\032\335\001\n\005" + + "Stage\022\021\n\004name\030\001 \001(\tB\003\340A\002\022-\n\004args\030\002 \003(\0132\032" + + ".google.firestore.v1.ValueB\003\340A\001\022F\n\007optio" + + "ns\030\003 \003(\01320.google.firestore.v1.Pipeline." + + "Stage.OptionsEntryB\003\340A\001\032J\n\014OptionsEntry\022" + + "\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google.fir" + + "estore.v1.Value:\0028\001B\305\001\n\027com.google.fires" + + "tore.v1B\rDocumentProtoP\001Z;cloud.google.c" + + "om/go/firestore/apiv1/firestorepb;firest" + + "orepb\242\002\004GCFS\252\002\031Google.Cloud.Firestore.V1" + + "\312\002\031Google\\Cloud\\Firestore\\V1\352\002\034Google::C" + + "loud::Firestore::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -136,6 +172,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GeoPointValue", "ArrayValue", "MapValue", + "FieldReferenceValue", + "FunctionValue", + "PipelineValue", "ValueType", }); internal_static_google_firestore_v1_ArrayValue_descriptor = @@ -162,6 +201,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_firestore_v1_Function_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_firestore_v1_Function_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_Function_descriptor, + new java.lang.String[] { + "Name", "Args", "Options", + }); + internal_static_google_firestore_v1_Function_OptionsEntry_descriptor = + internal_static_google_firestore_v1_Function_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_v1_Function_OptionsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_Function_OptionsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_firestore_v1_Pipeline_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_firestore_v1_Pipeline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_Pipeline_descriptor, + new java.lang.String[] { + "Stages", + }); + internal_static_google_firestore_v1_Pipeline_Stage_descriptor = + internal_static_google_firestore_v1_Pipeline_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_v1_Pipeline_Stage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_Pipeline_Stage_descriptor, + new java.lang.String[] { + "Name", "Args", "Options", + }); + internal_static_google_firestore_v1_Pipeline_Stage_OptionsEntry_descriptor = + internal_static_google_firestore_v1_Pipeline_Stage_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_v1_Pipeline_Stage_OptionsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_Pipeline_Stage_OptionsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java index 22a11396c..30fc0ea94 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -42,6 +42,7 @@ public final class DocumentRemove extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.DocumentRemove) DocumentRemoveOrBuilder { private static final long serialVersionUID = 0L; + // Use DocumentRemove.newBuilder() to construct. private DocumentRemove(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -78,6 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object document_ = ""; + /** * * @@ -102,6 +104,7 @@ public java.lang.String getDocument() { return s; } } + /** * * @@ -131,6 +134,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList removedTargetIds_ = emptyIntList(); + /** * * @@ -146,6 +150,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } + /** * * @@ -160,6 +165,7 @@ public java.util.List getRemovedTargetIdsList() { public int getRemovedTargetIdsCount() { return removedTargetIds_.size(); } + /** * * @@ -180,6 +186,7 @@ public int getRemovedTargetIds(int index) { public static final int READ_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -197,6 +204,7 @@ public int getRemovedTargetIds(int index) { public boolean hasReadTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -214,6 +222,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -429,6 +438,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -684,6 +694,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object document_ = ""; + /** * * @@ -707,6 +718,7 @@ public java.lang.String getDocument() { return (java.lang.String) ref; } } + /** * * @@ -730,6 +742,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -752,6 +765,7 @@ public Builder setDocument(java.lang.String value) { onChanged(); return this; } + /** * * @@ -770,6 +784,7 @@ public Builder clearDocument() { onChanged(); return this; } + /** * * @@ -802,6 +817,7 @@ private void ensureRemovedTargetIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -817,6 +833,7 @@ public java.util.List getRemovedTargetIdsList() { removedTargetIds_.makeImmutable(); return removedTargetIds_; } + /** * * @@ -831,6 +848,7 @@ public java.util.List getRemovedTargetIdsList() { public int getRemovedTargetIdsCount() { return removedTargetIds_.size(); } + /** * * @@ -846,6 +864,7 @@ public int getRemovedTargetIdsCount() { public int getRemovedTargetIds(int index) { return removedTargetIds_.getInt(index); } + /** * * @@ -867,6 +886,7 @@ public Builder setRemovedTargetIds(int index, int value) { onChanged(); return this; } + /** * * @@ -887,6 +907,7 @@ public Builder addRemovedTargetIds(int value) { onChanged(); return this; } + /** * * @@ -906,6 +927,7 @@ public Builder addAllRemovedTargetIds(java.lang.Iterable readTimeBuilder_; + /** * * @@ -946,6 +969,7 @@ public Builder clearRemovedTargetIds() { public boolean hasReadTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -966,6 +990,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -990,6 +1015,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1011,6 +1037,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -1040,6 +1067,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1061,6 +1089,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -1077,6 +1106,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1095,6 +1125,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java index e541eb5a0..214f3cc9b 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface DocumentRemoveOrBuilder @@ -37,6 +37,7 @@ public interface DocumentRemoveOrBuilder * @return The document. */ java.lang.String getDocument(); + /** * * @@ -63,6 +64,7 @@ public interface DocumentRemoveOrBuilder * @return A list containing the removedTargetIds. */ java.util.List getRemovedTargetIdsList(); + /** * * @@ -75,6 +77,7 @@ public interface DocumentRemoveOrBuilder * @return The count of removedTargetIds. */ int getRemovedTargetIdsCount(); + /** * * @@ -103,6 +106,7 @@ public interface DocumentRemoveOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -117,6 +121,7 @@ public interface DocumentRemoveOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java index 35b0fc9b0..51e898e22 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class DocumentTransform extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.firestore.v1.DocumentTransform) DocumentTransformOrBuilder { private static final long serialVersionUID = 0L; + // Use DocumentTransform.newBuilder() to construct. private DocumentTransform(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -83,6 +84,7 @@ public interface FieldTransformOrBuilder * @return The fieldPath. */ java.lang.String getFieldPath(); + /** * * @@ -112,6 +114,7 @@ public interface FieldTransformOrBuilder * @return Whether the setToServerValue field is set. */ boolean hasSetToServerValue(); + /** * * @@ -126,6 +129,7 @@ public interface FieldTransformOrBuilder * @return The enum numeric value on the wire for setToServerValue. */ int getSetToServerValueValue(); + /** * * @@ -162,6 +166,7 @@ public interface FieldTransformOrBuilder * @return Whether the increment field is set. */ boolean hasIncrement(); + /** * * @@ -183,6 +188,7 @@ public interface FieldTransformOrBuilder * @return The increment. */ com.google.firestore.v1.Value getIncrement(); + /** * * @@ -226,6 +232,7 @@ public interface FieldTransformOrBuilder * @return Whether the maximum field is set. */ boolean hasMaximum(); + /** * * @@ -249,6 +256,7 @@ public interface FieldTransformOrBuilder * @return The maximum. */ com.google.firestore.v1.Value getMaximum(); + /** * * @@ -294,6 +302,7 @@ public interface FieldTransformOrBuilder * @return Whether the minimum field is set. */ boolean hasMinimum(); + /** * * @@ -317,6 +326,7 @@ public interface FieldTransformOrBuilder * @return The minimum. */ com.google.firestore.v1.Value getMinimum(); + /** * * @@ -362,6 +372,7 @@ public interface FieldTransformOrBuilder * @return Whether the appendMissingElements field is set. */ boolean hasAppendMissingElements(); + /** * * @@ -385,6 +396,7 @@ public interface FieldTransformOrBuilder * @return The appendMissingElements. */ com.google.firestore.v1.ArrayValue getAppendMissingElements(); + /** * * @@ -428,6 +440,7 @@ public interface FieldTransformOrBuilder * @return Whether the removeAllFromArray field is set. */ boolean hasRemoveAllFromArray(); + /** * * @@ -449,6 +462,7 @@ public interface FieldTransformOrBuilder * @return The removeAllFromArray. */ com.google.firestore.v1.ArrayValue getRemoveAllFromArray(); + /** * * @@ -472,6 +486,7 @@ public interface FieldTransformOrBuilder com.google.firestore.v1.DocumentTransform.FieldTransform.TransformTypeCase getTransformTypeCase(); } + /** * * @@ -486,6 +501,7 @@ public static final class FieldTransform extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.v1.DocumentTransform.FieldTransform) FieldTransformOrBuilder { private static final long serialVersionUID = 0L; + // Use FieldTransform.newBuilder() to construct. private FieldTransform(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -561,6 +577,7 @@ public enum ServerValue implements com.google.protobuf.ProtocolMessageEnum { * SERVER_VALUE_UNSPECIFIED = 0; */ public static final int SERVER_VALUE_UNSPECIFIED_VALUE = 0; + /** * * @@ -678,6 +695,7 @@ public enum TransformTypeCase private TransformTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -722,6 +740,7 @@ public TransformTypeCase getTransformTypeCase() { @SuppressWarnings("serial") private volatile java.lang.Object fieldPath_ = ""; + /** * * @@ -747,6 +766,7 @@ public java.lang.String getFieldPath() { return s; } } + /** * * @@ -774,6 +794,7 @@ public com.google.protobuf.ByteString getFieldPathBytes() { } public static final int SET_TO_SERVER_VALUE_FIELD_NUMBER = 2; + /** * * @@ -790,6 +811,7 @@ public com.google.protobuf.ByteString getFieldPathBytes() { public boolean hasSetToServerValue() { return transformTypeCase_ == 2; } + /** * * @@ -809,6 +831,7 @@ public int getSetToServerValueValue() { } return 0; } + /** * * @@ -837,6 +860,7 @@ public int getSetToServerValueValue() { } public static final int INCREMENT_FIELD_NUMBER = 3; + /** * * @@ -861,6 +885,7 @@ public int getSetToServerValueValue() { public boolean hasIncrement() { return transformTypeCase_ == 3; } + /** * * @@ -888,6 +913,7 @@ public com.google.firestore.v1.Value getIncrement() { } return com.google.firestore.v1.Value.getDefaultInstance(); } + /** * * @@ -915,6 +941,7 @@ public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { } public static final int MAXIMUM_FIELD_NUMBER = 4; + /** * * @@ -941,6 +968,7 @@ public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { public boolean hasMaximum() { return transformTypeCase_ == 4; } + /** * * @@ -970,6 +998,7 @@ public com.google.firestore.v1.Value getMaximum() { } return com.google.firestore.v1.Value.getDefaultInstance(); } + /** * * @@ -999,6 +1028,7 @@ public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { } public static final int MINIMUM_FIELD_NUMBER = 5; + /** * * @@ -1025,6 +1055,7 @@ public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { public boolean hasMinimum() { return transformTypeCase_ == 5; } + /** * * @@ -1054,6 +1085,7 @@ public com.google.firestore.v1.Value getMinimum() { } return com.google.firestore.v1.Value.getDefaultInstance(); } + /** * * @@ -1083,6 +1115,7 @@ public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { } public static final int APPEND_MISSING_ELEMENTS_FIELD_NUMBER = 6; + /** * * @@ -1109,6 +1142,7 @@ public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { public boolean hasAppendMissingElements() { return transformTypeCase_ == 6; } + /** * * @@ -1138,6 +1172,7 @@ public com.google.firestore.v1.ArrayValue getAppendMissingElements() { } return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } + /** * * @@ -1167,6 +1202,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBui } public static final int REMOVE_ALL_FROM_ARRAY_FIELD_NUMBER = 7; + /** * * @@ -1191,6 +1227,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBui public boolean hasRemoveAllFromArray() { return transformTypeCase_ == 7; } + /** * * @@ -1218,6 +1255,7 @@ public com.google.firestore.v1.ArrayValue getRemoveAllFromArray() { } return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } + /** * * @@ -1504,6 +1542,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1819,6 +1858,7 @@ public Builder clearTransformType() { private int bitField0_; private java.lang.Object fieldPath_ = ""; + /** * * @@ -1843,6 +1883,7 @@ public java.lang.String getFieldPath() { return (java.lang.String) ref; } } + /** * * @@ -1867,6 +1908,7 @@ public com.google.protobuf.ByteString getFieldPathBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1890,6 +1932,7 @@ public Builder setFieldPath(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1909,6 +1952,7 @@ public Builder clearFieldPath() { onChanged(); return this; } + /** * * @@ -1951,6 +1995,7 @@ public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { public boolean hasSetToServerValue() { return transformTypeCase_ == 2; } + /** * * @@ -1971,6 +2016,7 @@ public int getSetToServerValueValue() { } return 0; } + /** * * @@ -1991,6 +2037,7 @@ public Builder setSetToServerValueValue(int value) { onChanged(); return this; } + /** * * @@ -2018,6 +2065,7 @@ public Builder setSetToServerValueValue(int value) { return com.google.firestore.v1.DocumentTransform.FieldTransform.ServerValue .SERVER_VALUE_UNSPECIFIED; } + /** * * @@ -2042,6 +2090,7 @@ public Builder setSetToServerValue( onChanged(); return this; } + /** * * @@ -2069,6 +2118,7 @@ public Builder clearSetToServerValue() { com.google.firestore.v1.Value.Builder, com.google.firestore.v1.ValueOrBuilder> incrementBuilder_; + /** * * @@ -2093,6 +2143,7 @@ public Builder clearSetToServerValue() { public boolean hasIncrement() { return transformTypeCase_ == 3; } + /** * * @@ -2127,6 +2178,7 @@ public com.google.firestore.v1.Value getIncrement() { return com.google.firestore.v1.Value.getDefaultInstance(); } } + /** * * @@ -2158,6 +2210,7 @@ public Builder setIncrement(com.google.firestore.v1.Value value) { transformTypeCase_ = 3; return this; } + /** * * @@ -2186,6 +2239,7 @@ public Builder setIncrement(com.google.firestore.v1.Value.Builder builderForValu transformTypeCase_ = 3; return this; } + /** * * @@ -2227,6 +2281,7 @@ public Builder mergeIncrement(com.google.firestore.v1.Value value) { transformTypeCase_ = 3; return this; } + /** * * @@ -2261,6 +2316,7 @@ public Builder clearIncrement() { } return this; } + /** * * @@ -2282,6 +2338,7 @@ public Builder clearIncrement() { public com.google.firestore.v1.Value.Builder getIncrementBuilder() { return getIncrementFieldBuilder().getBuilder(); } + /** * * @@ -2311,6 +2368,7 @@ public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { return com.google.firestore.v1.Value.getDefaultInstance(); } } + /** * * @@ -2358,6 +2416,7 @@ public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { com.google.firestore.v1.Value.Builder, com.google.firestore.v1.ValueOrBuilder> maximumBuilder_; + /** * * @@ -2384,6 +2443,7 @@ public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { public boolean hasMaximum() { return transformTypeCase_ == 4; } + /** * * @@ -2420,6 +2480,7 @@ public com.google.firestore.v1.Value getMaximum() { return com.google.firestore.v1.Value.getDefaultInstance(); } } + /** * * @@ -2453,6 +2514,7 @@ public Builder setMaximum(com.google.firestore.v1.Value value) { transformTypeCase_ = 4; return this; } + /** * * @@ -2483,6 +2545,7 @@ public Builder setMaximum(com.google.firestore.v1.Value.Builder builderForValue) transformTypeCase_ = 4; return this; } + /** * * @@ -2526,6 +2589,7 @@ public Builder mergeMaximum(com.google.firestore.v1.Value value) { transformTypeCase_ = 4; return this; } + /** * * @@ -2562,6 +2626,7 @@ public Builder clearMaximum() { } return this; } + /** * * @@ -2585,6 +2650,7 @@ public Builder clearMaximum() { public com.google.firestore.v1.Value.Builder getMaximumBuilder() { return getMaximumFieldBuilder().getBuilder(); } + /** * * @@ -2616,6 +2682,7 @@ public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { return com.google.firestore.v1.Value.getDefaultInstance(); } } + /** * * @@ -2665,6 +2732,7 @@ public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { com.google.firestore.v1.Value.Builder, com.google.firestore.v1.ValueOrBuilder> minimumBuilder_; + /** * * @@ -2691,6 +2759,7 @@ public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { public boolean hasMinimum() { return transformTypeCase_ == 5; } + /** * * @@ -2727,6 +2796,7 @@ public com.google.firestore.v1.Value getMinimum() { return com.google.firestore.v1.Value.getDefaultInstance(); } } + /** * * @@ -2760,6 +2830,7 @@ public Builder setMinimum(com.google.firestore.v1.Value value) { transformTypeCase_ = 5; return this; } + /** * * @@ -2790,6 +2861,7 @@ public Builder setMinimum(com.google.firestore.v1.Value.Builder builderForValue) transformTypeCase_ = 5; return this; } + /** * * @@ -2833,6 +2905,7 @@ public Builder mergeMinimum(com.google.firestore.v1.Value value) { transformTypeCase_ = 5; return this; } + /** * * @@ -2869,6 +2942,7 @@ public Builder clearMinimum() { } return this; } + /** * * @@ -2892,6 +2966,7 @@ public Builder clearMinimum() { public com.google.firestore.v1.Value.Builder getMinimumBuilder() { return getMinimumFieldBuilder().getBuilder(); } + /** * * @@ -2923,6 +2998,7 @@ public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { return com.google.firestore.v1.Value.getDefaultInstance(); } } + /** * * @@ -2972,6 +3048,7 @@ public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { com.google.firestore.v1.ArrayValue.Builder, com.google.firestore.v1.ArrayValueOrBuilder> appendMissingElementsBuilder_; + /** * * @@ -2998,6 +3075,7 @@ public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { public boolean hasAppendMissingElements() { return transformTypeCase_ == 6; } + /** * * @@ -3034,6 +3112,7 @@ public com.google.firestore.v1.ArrayValue getAppendMissingElements() { return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } } + /** * * @@ -3067,6 +3146,7 @@ public Builder setAppendMissingElements(com.google.firestore.v1.ArrayValue value transformTypeCase_ = 6; return this; } + /** * * @@ -3098,6 +3178,7 @@ public Builder setAppendMissingElements( transformTypeCase_ = 6; return this; } + /** * * @@ -3141,6 +3222,7 @@ public Builder mergeAppendMissingElements(com.google.firestore.v1.ArrayValue val transformTypeCase_ = 6; return this; } + /** * * @@ -3177,6 +3259,7 @@ public Builder clearAppendMissingElements() { } return this; } + /** * * @@ -3200,6 +3283,7 @@ public Builder clearAppendMissingElements() { public com.google.firestore.v1.ArrayValue.Builder getAppendMissingElementsBuilder() { return getAppendMissingElementsFieldBuilder().getBuilder(); } + /** * * @@ -3231,6 +3315,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBui return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } } + /** * * @@ -3280,6 +3365,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBui com.google.firestore.v1.ArrayValue.Builder, com.google.firestore.v1.ArrayValueOrBuilder> removeAllFromArrayBuilder_; + /** * * @@ -3304,6 +3390,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBui public boolean hasRemoveAllFromArray() { return transformTypeCase_ == 7; } + /** * * @@ -3338,6 +3425,7 @@ public com.google.firestore.v1.ArrayValue getRemoveAllFromArray() { return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } } + /** * * @@ -3369,6 +3457,7 @@ public Builder setRemoveAllFromArray(com.google.firestore.v1.ArrayValue value) { transformTypeCase_ = 7; return this; } + /** * * @@ -3398,6 +3487,7 @@ public Builder setRemoveAllFromArray( transformTypeCase_ = 7; return this; } + /** * * @@ -3439,6 +3529,7 @@ public Builder mergeRemoveAllFromArray(com.google.firestore.v1.ArrayValue value) transformTypeCase_ = 7; return this; } + /** * * @@ -3473,6 +3564,7 @@ public Builder clearRemoveAllFromArray() { } return this; } + /** * * @@ -3494,6 +3586,7 @@ public Builder clearRemoveAllFromArray() { public com.google.firestore.v1.ArrayValue.Builder getRemoveAllFromArrayBuilder() { return getRemoveAllFromArrayFieldBuilder().getBuilder(); } + /** * * @@ -3523,6 +3616,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilde return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } } + /** * * @@ -3633,6 +3727,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getDefaultInstan @SuppressWarnings("serial") private volatile java.lang.Object document_ = ""; + /** * * @@ -3656,6 +3751,7 @@ public java.lang.String getDocument() { return s; } } + /** * * @@ -3684,6 +3780,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { @SuppressWarnings("serial") private java.util.List fieldTransforms_; + /** * * @@ -3701,6 +3798,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { getFieldTransformsList() { return fieldTransforms_; } + /** * * @@ -3718,6 +3816,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { getFieldTransformsOrBuilderList() { return fieldTransforms_; } + /** * * @@ -3734,6 +3833,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { public int getFieldTransformsCount() { return fieldTransforms_.size(); } + /** * * @@ -3750,6 +3850,7 @@ public int getFieldTransformsCount() { public com.google.firestore.v1.DocumentTransform.FieldTransform getFieldTransforms(int index) { return fieldTransforms_.get(index); } + /** * * @@ -3938,6 +4039,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -4182,6 +4284,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object document_ = ""; + /** * * @@ -4204,6 +4307,7 @@ public java.lang.String getDocument() { return (java.lang.String) ref; } } + /** * * @@ -4226,6 +4330,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4247,6 +4352,7 @@ public Builder setDocument(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4264,6 +4370,7 @@ public Builder clearDocument() { onChanged(); return this; } + /** * * @@ -4325,6 +4432,7 @@ private void ensureFieldTransformsIsMutable() { return fieldTransformsBuilder_.getMessageList(); } } + /** * * @@ -4344,6 +4452,7 @@ public int getFieldTransformsCount() { return fieldTransformsBuilder_.getCount(); } } + /** * * @@ -4363,6 +4472,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getFieldTransfor return fieldTransformsBuilder_.getMessage(index); } } + /** * * @@ -4389,6 +4499,7 @@ public Builder setFieldTransforms( } return this; } + /** * * @@ -4413,6 +4524,7 @@ public Builder setFieldTransforms( } return this; } + /** * * @@ -4439,6 +4551,7 @@ public Builder addFieldTransforms( } return this; } + /** * * @@ -4465,6 +4578,7 @@ public Builder addFieldTransforms( } return this; } + /** * * @@ -4488,6 +4602,7 @@ public Builder addFieldTransforms( } return this; } + /** * * @@ -4512,6 +4627,7 @@ public Builder addFieldTransforms( } return this; } + /** * * @@ -4536,6 +4652,7 @@ public Builder addAllFieldTransforms( } return this; } + /** * * @@ -4558,6 +4675,7 @@ public Builder clearFieldTransforms() { } return this; } + /** * * @@ -4580,6 +4698,7 @@ public Builder removeFieldTransforms(int index) { } return this; } + /** * * @@ -4596,6 +4715,7 @@ public Builder removeFieldTransforms(int index) { getFieldTransformsBuilder(int index) { return getFieldTransformsFieldBuilder().getBuilder(index); } + /** * * @@ -4616,6 +4736,7 @@ public Builder removeFieldTransforms(int index) { return fieldTransformsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -4637,6 +4758,7 @@ public Builder removeFieldTransforms(int index) { return java.util.Collections.unmodifiableList(fieldTransforms_); } } + /** * * @@ -4655,6 +4777,7 @@ public Builder removeFieldTransforms(int index) { .addBuilder( com.google.firestore.v1.DocumentTransform.FieldTransform.getDefaultInstance()); } + /** * * @@ -4673,6 +4796,7 @@ public Builder removeFieldTransforms(int index) { .addBuilder( index, com.google.firestore.v1.DocumentTransform.FieldTransform.getDefaultInstance()); } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransformOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransformOrBuilder.java index d5d1ae17a..c0bd9e75a 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransformOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransformOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface DocumentTransformOrBuilder @@ -36,6 +36,7 @@ public interface DocumentTransformOrBuilder * @return The document. */ java.lang.String getDocument(); + /** * * @@ -62,6 +63,7 @@ public interface DocumentTransformOrBuilder *
*/ java.util.List getFieldTransformsList(); + /** * * @@ -75,6 +77,7 @@ public interface DocumentTransformOrBuilder * */ com.google.firestore.v1.DocumentTransform.FieldTransform getFieldTransforms(int index); + /** * * @@ -88,6 +91,7 @@ public interface DocumentTransformOrBuilder * */ int getFieldTransformsCount(); + /** * * @@ -102,6 +106,7 @@ public interface DocumentTransformOrBuilder */ java.util.List getFieldTransformsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineRequest.java new file mode 100644 index 000000000..457f862f1 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineRequest.java @@ -0,0 +1,1959 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +/** + * + * + *
+ * The request for
+ * [Firestore.ExecutePipeline][google.firestore.v1.Firestore.ExecutePipeline].
+ * 
+ * + * Protobuf type {@code google.firestore.v1.ExecutePipelineRequest} + */ +public final class ExecutePipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.ExecutePipelineRequest) + ExecutePipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExecutePipelineRequest.newBuilder() to construct. + private ExecutePipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutePipelineRequest() { + database_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutePipelineRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.ExecutePipelineRequest.class, + com.google.firestore.v1.ExecutePipelineRequest.Builder.class); + } + + private int pipelineTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object pipelineType_; + + public enum PipelineTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRUCTURED_PIPELINE(2), + PIPELINETYPE_NOT_SET(0); + private final int value; + + private PipelineTypeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PipelineTypeCase valueOf(int value) { + return forNumber(value); + } + + public static PipelineTypeCase forNumber(int value) { + switch (value) { + case 2: + return STRUCTURED_PIPELINE; + case 0: + return PIPELINETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PipelineTypeCase getPipelineTypeCase() { + return PipelineTypeCase.forNumber(pipelineTypeCase_); + } + + private int consistencySelectorCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object consistencySelector_; + + public enum ConsistencySelectorCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRANSACTION(5), + NEW_TRANSACTION(6), + READ_TIME(7), + CONSISTENCYSELECTOR_NOT_SET(0); + private final int value; + + private ConsistencySelectorCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConsistencySelectorCase valueOf(int value) { + return forNumber(value); + } + + public static ConsistencySelectorCase forNumber(int value) { + switch (value) { + case 5: + return TRANSACTION; + case 6: + return NEW_TRANSACTION; + case 7: + return READ_TIME; + case 0: + return CONSISTENCYSELECTOR_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConsistencySelectorCase getConsistencySelectorCase() { + return ConsistencySelectorCase.forNumber(consistencySelectorCase_); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + + /** + * + * + *
+   * Required. Database identifier, in the form
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Database identifier, in the form
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRUCTURED_PIPELINE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A pipelined operation.
+   * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * + * @return Whether the structuredPipeline field is set. + */ + @java.lang.Override + public boolean hasStructuredPipeline() { + return pipelineTypeCase_ == 2; + } + + /** + * + * + *
+   * A pipelined operation.
+   * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * + * @return The structuredPipeline. + */ + @java.lang.Override + public com.google.firestore.v1.StructuredPipeline getStructuredPipeline() { + if (pipelineTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredPipeline) pipelineType_; + } + return com.google.firestore.v1.StructuredPipeline.getDefaultInstance(); + } + + /** + * + * + *
+   * A pipelined operation.
+   * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + @java.lang.Override + public com.google.firestore.v1.StructuredPipelineOrBuilder getStructuredPipelineOrBuilder() { + if (pipelineTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredPipeline) pipelineType_; + } + return com.google.firestore.v1.StructuredPipeline.getDefaultInstance(); + } + + public static final int TRANSACTION_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Run the query within an already active transaction.
+   *
+   * The value here is the opaque transaction ID to execute the query in.
+   * 
+ * + * bytes transaction = 5; + * + * @return Whether the transaction field is set. + */ + @java.lang.Override + public boolean hasTransaction() { + return consistencySelectorCase_ == 5; + } + + /** + * + * + *
+   * Run the query within an already active transaction.
+   *
+   * The value here is the opaque transaction ID to execute the query in.
+   * 
+ * + * bytes transaction = 5; + * + * @return The transaction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransaction() { + if (consistencySelectorCase_ == 5) { + return (com.google.protobuf.ByteString) consistencySelector_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int NEW_TRANSACTION_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Execute the pipeline in a new transaction.
+   *
+   * The identifier of the newly created transaction will be returned in the
+   * first response on the stream. This defaults to a read-only transaction.
+   * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + * + * @return Whether the newTransaction field is set. + */ + @java.lang.Override + public boolean hasNewTransaction() { + return consistencySelectorCase_ == 6; + } + + /** + * + * + *
+   * Execute the pipeline in a new transaction.
+   *
+   * The identifier of the newly created transaction will be returned in the
+   * first response on the stream. This defaults to a read-only transaction.
+   * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + * + * @return The newTransaction. + */ + @java.lang.Override + public com.google.firestore.v1.TransactionOptions getNewTransaction() { + if (consistencySelectorCase_ == 6) { + return (com.google.firestore.v1.TransactionOptions) consistencySelector_; + } + return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); + } + + /** + * + * + *
+   * Execute the pipeline in a new transaction.
+   *
+   * The identifier of the newly created transaction will be returned in the
+   * first response on the stream. This defaults to a read-only transaction.
+   * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + @java.lang.Override + public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { + if (consistencySelectorCase_ == 6) { + return (com.google.firestore.v1.TransactionOptions) consistencySelector_; + } + return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); + } + + public static final int READ_TIME_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Execute the pipeline in a snapshot transaction at the given time.
+   *
+   * This must be a microsecond precision timestamp within the past one hour,
+   * or if Point-in-Time Recovery is enabled, can additionally be a whole
+   * minute timestamp within the past 7 days.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 7; + * + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return consistencySelectorCase_ == 7; + } + + /** + * + * + *
+   * Execute the pipeline in a snapshot transaction at the given time.
+   *
+   * This must be a microsecond precision timestamp within the past one hour,
+   * or if Point-in-Time Recovery is enabled, can additionally be a whole
+   * minute timestamp within the past 7 days.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 7; + * + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + if (consistencySelectorCase_ == 7) { + return (com.google.protobuf.Timestamp) consistencySelector_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + /** + * + * + *
+   * Execute the pipeline in a snapshot transaction at the given time.
+   *
+   * This must be a microsecond precision timestamp within the past one hour,
+   * or if Point-in-Time Recovery is enabled, can additionally be a whole
+   * minute timestamp within the past 7 days.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (consistencySelectorCase_ == 7) { + return (com.google.protobuf.Timestamp) consistencySelector_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + if (pipelineTypeCase_ == 2) { + output.writeMessage(2, (com.google.firestore.v1.StructuredPipeline) pipelineType_); + } + if (consistencySelectorCase_ == 5) { + output.writeBytes(5, (com.google.protobuf.ByteString) consistencySelector_); + } + if (consistencySelectorCase_ == 6) { + output.writeMessage(6, (com.google.firestore.v1.TransactionOptions) consistencySelector_); + } + if (consistencySelectorCase_ == 7) { + output.writeMessage(7, (com.google.protobuf.Timestamp) consistencySelector_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + if (pipelineTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.firestore.v1.StructuredPipeline) pipelineType_); + } + if (consistencySelectorCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 5, (com.google.protobuf.ByteString) consistencySelector_); + } + if (consistencySelectorCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.firestore.v1.TransactionOptions) consistencySelector_); + } + if (consistencySelectorCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.protobuf.Timestamp) consistencySelector_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.ExecutePipelineRequest)) { + return super.equals(obj); + } + com.google.firestore.v1.ExecutePipelineRequest other = + (com.google.firestore.v1.ExecutePipelineRequest) obj; + + if (!getDatabase().equals(other.getDatabase())) return false; + if (!getPipelineTypeCase().equals(other.getPipelineTypeCase())) return false; + switch (pipelineTypeCase_) { + case 2: + if (!getStructuredPipeline().equals(other.getStructuredPipeline())) return false; + break; + case 0: + default: + } + if (!getConsistencySelectorCase().equals(other.getConsistencySelectorCase())) return false; + switch (consistencySelectorCase_) { + case 5: + if (!getTransaction().equals(other.getTransaction())) return false; + break; + case 6: + if (!getNewTransaction().equals(other.getNewTransaction())) return false; + break; + case 7: + if (!getReadTime().equals(other.getReadTime())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + switch (pipelineTypeCase_) { + case 2: + hash = (37 * hash) + STRUCTURED_PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getStructuredPipeline().hashCode(); + break; + case 0: + default: + } + switch (consistencySelectorCase_) { + case 5: + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + break; + case 6: + hash = (37 * hash) + NEW_TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getNewTransaction().hashCode(); + break; + case 7: + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExecutePipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.ExecutePipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [Firestore.ExecutePipeline][google.firestore.v1.Firestore.ExecutePipeline].
+   * 
+ * + * Protobuf type {@code google.firestore.v1.ExecutePipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.ExecutePipelineRequest) + com.google.firestore.v1.ExecutePipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.ExecutePipelineRequest.class, + com.google.firestore.v1.ExecutePipelineRequest.Builder.class); + } + + // Construct using com.google.firestore.v1.ExecutePipelineRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + database_ = ""; + if (structuredPipelineBuilder_ != null) { + structuredPipelineBuilder_.clear(); + } + if (newTransactionBuilder_ != null) { + newTransactionBuilder_.clear(); + } + if (readTimeBuilder_ != null) { + readTimeBuilder_.clear(); + } + pipelineTypeCase_ = 0; + pipelineType_ = null; + consistencySelectorCase_ = 0; + consistencySelector_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineRequest getDefaultInstanceForType() { + return com.google.firestore.v1.ExecutePipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineRequest build() { + com.google.firestore.v1.ExecutePipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineRequest buildPartial() { + com.google.firestore.v1.ExecutePipelineRequest result = + new com.google.firestore.v1.ExecutePipelineRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.v1.ExecutePipelineRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.database_ = database_; + } + } + + private void buildPartialOneofs(com.google.firestore.v1.ExecutePipelineRequest result) { + result.pipelineTypeCase_ = pipelineTypeCase_; + result.pipelineType_ = this.pipelineType_; + if (pipelineTypeCase_ == 2 && structuredPipelineBuilder_ != null) { + result.pipelineType_ = structuredPipelineBuilder_.build(); + } + result.consistencySelectorCase_ = consistencySelectorCase_; + result.consistencySelector_ = this.consistencySelector_; + if (consistencySelectorCase_ == 6 && newTransactionBuilder_ != null) { + result.consistencySelector_ = newTransactionBuilder_.build(); + } + if (consistencySelectorCase_ == 7 && readTimeBuilder_ != null) { + result.consistencySelector_ = readTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.ExecutePipelineRequest) { + return mergeFrom((com.google.firestore.v1.ExecutePipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.ExecutePipelineRequest other) { + if (other == com.google.firestore.v1.ExecutePipelineRequest.getDefaultInstance()) return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getPipelineTypeCase()) { + case STRUCTURED_PIPELINE: + { + mergeStructuredPipeline(other.getStructuredPipeline()); + break; + } + case PIPELINETYPE_NOT_SET: + { + break; + } + } + switch (other.getConsistencySelectorCase()) { + case TRANSACTION: + { + setTransaction(other.getTransaction()); + break; + } + case NEW_TRANSACTION: + { + mergeNewTransaction(other.getNewTransaction()); + break; + } + case READ_TIME: + { + mergeReadTime(other.getReadTime()); + break; + } + case CONSISTENCYSELECTOR_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getStructuredPipelineFieldBuilder().getBuilder(), extensionRegistry); + pipelineTypeCase_ = 2; + break; + } // case 18 + case 42: + { + consistencySelector_ = input.readBytes(); + consistencySelectorCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getNewTransactionFieldBuilder().getBuilder(), extensionRegistry); + consistencySelectorCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + consistencySelectorCase_ = 7; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int pipelineTypeCase_ = 0; + private java.lang.Object pipelineType_; + + public PipelineTypeCase getPipelineTypeCase() { + return PipelineTypeCase.forNumber(pipelineTypeCase_); + } + + public Builder clearPipelineType() { + pipelineTypeCase_ = 0; + pipelineType_ = null; + onChanged(); + return this; + } + + private int consistencySelectorCase_ = 0; + private java.lang.Object consistencySelector_; + + public ConsistencySelectorCase getConsistencySelectorCase() { + return ConsistencySelectorCase.forNumber(consistencySelectorCase_); + } + + public Builder clearConsistencySelector() { + consistencySelectorCase_ = 0; + consistencySelector_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object database_ = ""; + + /** + * + * + *
+     * Required. Database identifier, in the form
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Database identifier, in the form
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Database identifier, in the form
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Database identifier, in the form
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Database identifier, in the form
+     * `projects/{project}/databases/{database}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredPipeline, + com.google.firestore.v1.StructuredPipeline.Builder, + com.google.firestore.v1.StructuredPipelineOrBuilder> + structuredPipelineBuilder_; + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * + * @return Whether the structuredPipeline field is set. + */ + @java.lang.Override + public boolean hasStructuredPipeline() { + return pipelineTypeCase_ == 2; + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * + * @return The structuredPipeline. + */ + @java.lang.Override + public com.google.firestore.v1.StructuredPipeline getStructuredPipeline() { + if (structuredPipelineBuilder_ == null) { + if (pipelineTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredPipeline) pipelineType_; + } + return com.google.firestore.v1.StructuredPipeline.getDefaultInstance(); + } else { + if (pipelineTypeCase_ == 2) { + return structuredPipelineBuilder_.getMessage(); + } + return com.google.firestore.v1.StructuredPipeline.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + public Builder setStructuredPipeline(com.google.firestore.v1.StructuredPipeline value) { + if (structuredPipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pipelineType_ = value; + onChanged(); + } else { + structuredPipelineBuilder_.setMessage(value); + } + pipelineTypeCase_ = 2; + return this; + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + public Builder setStructuredPipeline( + com.google.firestore.v1.StructuredPipeline.Builder builderForValue) { + if (structuredPipelineBuilder_ == null) { + pipelineType_ = builderForValue.build(); + onChanged(); + } else { + structuredPipelineBuilder_.setMessage(builderForValue.build()); + } + pipelineTypeCase_ = 2; + return this; + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + public Builder mergeStructuredPipeline(com.google.firestore.v1.StructuredPipeline value) { + if (structuredPipelineBuilder_ == null) { + if (pipelineTypeCase_ == 2 + && pipelineType_ != com.google.firestore.v1.StructuredPipeline.getDefaultInstance()) { + pipelineType_ = + com.google.firestore.v1.StructuredPipeline.newBuilder( + (com.google.firestore.v1.StructuredPipeline) pipelineType_) + .mergeFrom(value) + .buildPartial(); + } else { + pipelineType_ = value; + } + onChanged(); + } else { + if (pipelineTypeCase_ == 2) { + structuredPipelineBuilder_.mergeFrom(value); + } else { + structuredPipelineBuilder_.setMessage(value); + } + } + pipelineTypeCase_ = 2; + return this; + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + public Builder clearStructuredPipeline() { + if (structuredPipelineBuilder_ == null) { + if (pipelineTypeCase_ == 2) { + pipelineTypeCase_ = 0; + pipelineType_ = null; + onChanged(); + } + } else { + if (pipelineTypeCase_ == 2) { + pipelineTypeCase_ = 0; + pipelineType_ = null; + } + structuredPipelineBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + public com.google.firestore.v1.StructuredPipeline.Builder getStructuredPipelineBuilder() { + return getStructuredPipelineFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + @java.lang.Override + public com.google.firestore.v1.StructuredPipelineOrBuilder getStructuredPipelineOrBuilder() { + if ((pipelineTypeCase_ == 2) && (structuredPipelineBuilder_ != null)) { + return structuredPipelineBuilder_.getMessageOrBuilder(); + } else { + if (pipelineTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredPipeline) pipelineType_; + } + return com.google.firestore.v1.StructuredPipeline.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A pipelined operation.
+     * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredPipeline, + com.google.firestore.v1.StructuredPipeline.Builder, + com.google.firestore.v1.StructuredPipelineOrBuilder> + getStructuredPipelineFieldBuilder() { + if (structuredPipelineBuilder_ == null) { + if (!(pipelineTypeCase_ == 2)) { + pipelineType_ = com.google.firestore.v1.StructuredPipeline.getDefaultInstance(); + } + structuredPipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredPipeline, + com.google.firestore.v1.StructuredPipeline.Builder, + com.google.firestore.v1.StructuredPipelineOrBuilder>( + (com.google.firestore.v1.StructuredPipeline) pipelineType_, + getParentForChildren(), + isClean()); + pipelineType_ = null; + } + pipelineTypeCase_ = 2; + onChanged(); + return structuredPipelineBuilder_; + } + + /** + * + * + *
+     * Run the query within an already active transaction.
+     *
+     * The value here is the opaque transaction ID to execute the query in.
+     * 
+ * + * bytes transaction = 5; + * + * @return Whether the transaction field is set. + */ + public boolean hasTransaction() { + return consistencySelectorCase_ == 5; + } + + /** + * + * + *
+     * Run the query within an already active transaction.
+     *
+     * The value here is the opaque transaction ID to execute the query in.
+     * 
+ * + * bytes transaction = 5; + * + * @return The transaction. + */ + public com.google.protobuf.ByteString getTransaction() { + if (consistencySelectorCase_ == 5) { + return (com.google.protobuf.ByteString) consistencySelector_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + /** + * + * + *
+     * Run the query within an already active transaction.
+     *
+     * The value here is the opaque transaction ID to execute the query in.
+     * 
+ * + * bytes transaction = 5; + * + * @param value The transaction to set. + * @return This builder for chaining. + */ + public Builder setTransaction(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + consistencySelectorCase_ = 5; + consistencySelector_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Run the query within an already active transaction.
+     *
+     * The value here is the opaque transaction ID to execute the query in.
+     * 
+ * + * bytes transaction = 5; + * + * @return This builder for chaining. + */ + public Builder clearTransaction() { + if (consistencySelectorCase_ == 5) { + consistencySelectorCase_ = 0; + consistencySelector_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.TransactionOptions, + com.google.firestore.v1.TransactionOptions.Builder, + com.google.firestore.v1.TransactionOptionsOrBuilder> + newTransactionBuilder_; + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + * + * @return Whether the newTransaction field is set. + */ + @java.lang.Override + public boolean hasNewTransaction() { + return consistencySelectorCase_ == 6; + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + * + * @return The newTransaction. + */ + @java.lang.Override + public com.google.firestore.v1.TransactionOptions getNewTransaction() { + if (newTransactionBuilder_ == null) { + if (consistencySelectorCase_ == 6) { + return (com.google.firestore.v1.TransactionOptions) consistencySelector_; + } + return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); + } else { + if (consistencySelectorCase_ == 6) { + return newTransactionBuilder_.getMessage(); + } + return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + public Builder setNewTransaction(com.google.firestore.v1.TransactionOptions value) { + if (newTransactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistencySelector_ = value; + onChanged(); + } else { + newTransactionBuilder_.setMessage(value); + } + consistencySelectorCase_ = 6; + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + public Builder setNewTransaction( + com.google.firestore.v1.TransactionOptions.Builder builderForValue) { + if (newTransactionBuilder_ == null) { + consistencySelector_ = builderForValue.build(); + onChanged(); + } else { + newTransactionBuilder_.setMessage(builderForValue.build()); + } + consistencySelectorCase_ = 6; + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + public Builder mergeNewTransaction(com.google.firestore.v1.TransactionOptions value) { + if (newTransactionBuilder_ == null) { + if (consistencySelectorCase_ == 6 + && consistencySelector_ + != com.google.firestore.v1.TransactionOptions.getDefaultInstance()) { + consistencySelector_ = + com.google.firestore.v1.TransactionOptions.newBuilder( + (com.google.firestore.v1.TransactionOptions) consistencySelector_) + .mergeFrom(value) + .buildPartial(); + } else { + consistencySelector_ = value; + } + onChanged(); + } else { + if (consistencySelectorCase_ == 6) { + newTransactionBuilder_.mergeFrom(value); + } else { + newTransactionBuilder_.setMessage(value); + } + } + consistencySelectorCase_ = 6; + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + public Builder clearNewTransaction() { + if (newTransactionBuilder_ == null) { + if (consistencySelectorCase_ == 6) { + consistencySelectorCase_ = 0; + consistencySelector_ = null; + onChanged(); + } + } else { + if (consistencySelectorCase_ == 6) { + consistencySelectorCase_ = 0; + consistencySelector_ = null; + } + newTransactionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + public com.google.firestore.v1.TransactionOptions.Builder getNewTransactionBuilder() { + return getNewTransactionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + @java.lang.Override + public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { + if ((consistencySelectorCase_ == 6) && (newTransactionBuilder_ != null)) { + return newTransactionBuilder_.getMessageOrBuilder(); + } else { + if (consistencySelectorCase_ == 6) { + return (com.google.firestore.v1.TransactionOptions) consistencySelector_; + } + return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Execute the pipeline in a new transaction.
+     *
+     * The identifier of the newly created transaction will be returned in the
+     * first response on the stream. This defaults to a read-only transaction.
+     * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.TransactionOptions, + com.google.firestore.v1.TransactionOptions.Builder, + com.google.firestore.v1.TransactionOptionsOrBuilder> + getNewTransactionFieldBuilder() { + if (newTransactionBuilder_ == null) { + if (!(consistencySelectorCase_ == 6)) { + consistencySelector_ = com.google.firestore.v1.TransactionOptions.getDefaultInstance(); + } + newTransactionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.TransactionOptions, + com.google.firestore.v1.TransactionOptions.Builder, + com.google.firestore.v1.TransactionOptionsOrBuilder>( + (com.google.firestore.v1.TransactionOptions) consistencySelector_, + getParentForChildren(), + isClean()); + consistencySelector_ = null; + } + consistencySelectorCase_ = 6; + onChanged(); + return newTransactionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + readTimeBuilder_; + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + * + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return consistencySelectorCase_ == 7; + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + * + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + if (consistencySelectorCase_ == 7) { + return (com.google.protobuf.Timestamp) consistencySelector_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (consistencySelectorCase_ == 7) { + return readTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistencySelector_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + consistencySelectorCase_ = 7; + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + consistencySelector_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + consistencySelectorCase_ = 7; + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (consistencySelectorCase_ == 7 + && consistencySelector_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + consistencySelector_ = + com.google.protobuf.Timestamp.newBuilder( + (com.google.protobuf.Timestamp) consistencySelector_) + .mergeFrom(value) + .buildPartial(); + } else { + consistencySelector_ = value; + } + onChanged(); + } else { + if (consistencySelectorCase_ == 7) { + readTimeBuilder_.mergeFrom(value); + } else { + readTimeBuilder_.setMessage(value); + } + } + consistencySelectorCase_ = 7; + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + if (consistencySelectorCase_ == 7) { + consistencySelectorCase_ = 0; + consistencySelector_ = null; + onChanged(); + } + } else { + if (consistencySelectorCase_ == 7) { + consistencySelectorCase_ = 0; + consistencySelector_ = null; + } + readTimeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + return getReadTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if ((consistencySelectorCase_ == 7) && (readTimeBuilder_ != null)) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + if (consistencySelectorCase_ == 7) { + return (com.google.protobuf.Timestamp) consistencySelector_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Execute the pipeline in a snapshot transaction at the given time.
+     *
+     * This must be a microsecond precision timestamp within the past one hour,
+     * or if Point-in-Time Recovery is enabled, can additionally be a whole
+     * minute timestamp within the past 7 days.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + if (!(consistencySelectorCase_ == 7)) { + consistencySelector_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + readTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) consistencySelector_, + getParentForChildren(), + isClean()); + consistencySelector_ = null; + } + consistencySelectorCase_ = 7; + onChanged(); + return readTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.ExecutePipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.ExecutePipelineRequest) + private static final com.google.firestore.v1.ExecutePipelineRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.ExecutePipelineRequest(); + } + + public static com.google.firestore.v1.ExecutePipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutePipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineRequestOrBuilder.java new file mode 100644 index 000000000..f90977e64 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineRequestOrBuilder.java @@ -0,0 +1,221 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public interface ExecutePipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.ExecutePipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Database identifier, in the form
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + java.lang.String getDatabase(); + + /** + * + * + *
+   * Required. Database identifier, in the form
+   * `projects/{project}/databases/{database}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + com.google.protobuf.ByteString getDatabaseBytes(); + + /** + * + * + *
+   * A pipelined operation.
+   * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * + * @return Whether the structuredPipeline field is set. + */ + boolean hasStructuredPipeline(); + + /** + * + * + *
+   * A pipelined operation.
+   * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * + * @return The structuredPipeline. + */ + com.google.firestore.v1.StructuredPipeline getStructuredPipeline(); + + /** + * + * + *
+   * A pipelined operation.
+   * 
+ * + * .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + */ + com.google.firestore.v1.StructuredPipelineOrBuilder getStructuredPipelineOrBuilder(); + + /** + * + * + *
+   * Run the query within an already active transaction.
+   *
+   * The value here is the opaque transaction ID to execute the query in.
+   * 
+ * + * bytes transaction = 5; + * + * @return Whether the transaction field is set. + */ + boolean hasTransaction(); + + /** + * + * + *
+   * Run the query within an already active transaction.
+   *
+   * The value here is the opaque transaction ID to execute the query in.
+   * 
+ * + * bytes transaction = 5; + * + * @return The transaction. + */ + com.google.protobuf.ByteString getTransaction(); + + /** + * + * + *
+   * Execute the pipeline in a new transaction.
+   *
+   * The identifier of the newly created transaction will be returned in the
+   * first response on the stream. This defaults to a read-only transaction.
+   * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + * + * @return Whether the newTransaction field is set. + */ + boolean hasNewTransaction(); + + /** + * + * + *
+   * Execute the pipeline in a new transaction.
+   *
+   * The identifier of the newly created transaction will be returned in the
+   * first response on the stream. This defaults to a read-only transaction.
+   * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + * + * @return The newTransaction. + */ + com.google.firestore.v1.TransactionOptions getNewTransaction(); + + /** + * + * + *
+   * Execute the pipeline in a new transaction.
+   *
+   * The identifier of the newly created transaction will be returned in the
+   * first response on the stream. This defaults to a read-only transaction.
+   * 
+ * + * .google.firestore.v1.TransactionOptions new_transaction = 6; + */ + com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder(); + + /** + * + * + *
+   * Execute the pipeline in a snapshot transaction at the given time.
+   *
+   * This must be a microsecond precision timestamp within the past one hour,
+   * or if Point-in-Time Recovery is enabled, can additionally be a whole
+   * minute timestamp within the past 7 days.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 7; + * + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + + /** + * + * + *
+   * Execute the pipeline in a snapshot transaction at the given time.
+   *
+   * This must be a microsecond precision timestamp within the past one hour,
+   * or if Point-in-Time Recovery is enabled, can additionally be a whole
+   * minute timestamp within the past 7 days.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 7; + * + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + + /** + * + * + *
+   * Execute the pipeline in a snapshot transaction at the given time.
+   *
+   * This must be a microsecond precision timestamp within the past one hour,
+   * or if Point-in-Time Recovery is enabled, can additionally be a whole
+   * minute timestamp within the past 7 days.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + com.google.firestore.v1.ExecutePipelineRequest.PipelineTypeCase getPipelineTypeCase(); + + com.google.firestore.v1.ExecutePipelineRequest.ConsistencySelectorCase + getConsistencySelectorCase(); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineResponse.java new file mode 100644 index 000000000..c5f32f473 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineResponse.java @@ -0,0 +1,2031 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +/** + * + * + *
+ * The response for [Firestore.Execute][].
+ * 
+ * + * Protobuf type {@code google.firestore.v1.ExecutePipelineResponse} + */ +public final class ExecutePipelineResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.ExecutePipelineResponse) + ExecutePipelineResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExecutePipelineResponse.newBuilder() to construct. + private ExecutePipelineResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutePipelineResponse() { + transaction_ = com.google.protobuf.ByteString.EMPTY; + results_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutePipelineResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.ExecutePipelineResponse.class, + com.google.firestore.v1.ExecutePipelineResponse.Builder.class); + } + + private int bitField0_; + public static final int TRANSACTION_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * Newly created transaction identifier.
+   *
+   * This field is only specified as part of the first response from the server,
+   * alongside the `results` field when the original request specified
+   * [ExecuteRequest.new_transaction][].
+   * 
+ * + * bytes transaction = 1; + * + * @return The transaction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransaction() { + return transaction_; + } + + public static final int RESULTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List results_; + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + @java.lang.Override + public com.google.firestore.v1.Document getResults(int index) { + return results_.get(index); + } + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + @java.lang.Override + public com.google.firestore.v1.DocumentOrBuilder getResultsOrBuilder(int index) { + return results_.get(index); + } + + public static final int EXECUTION_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp executionTime_; + + /** + * + * + *
+   * The time at which the document(s) were read.
+   *
+   * This may be monotonically increasing; in this case, the previous documents
+   * in the result stream are guaranteed not to have changed between their
+   * `execution_time` and this one.
+   *
+   * If the query returns no results, a response with `execution_time` and no
+   * `results` will be sent, and this represents the time at which the operation
+   * was run.
+   * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + * + * @return Whether the executionTime field is set. + */ + @java.lang.Override + public boolean hasExecutionTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The time at which the document(s) were read.
+   *
+   * This may be monotonically increasing; in this case, the previous documents
+   * in the result stream are guaranteed not to have changed between their
+   * `execution_time` and this one.
+   *
+   * If the query returns no results, a response with `execution_time` and no
+   * `results` will be sent, and this represents the time at which the operation
+   * was run.
+   * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + * + * @return The executionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExecutionTime() { + return executionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : executionTime_; + } + + /** + * + * + *
+   * The time at which the document(s) were read.
+   *
+   * This may be monotonically increasing; in this case, the previous documents
+   * in the result stream are guaranteed not to have changed between their
+   * `execution_time` and this one.
+   *
+   * If the query returns no results, a response with `execution_time` and no
+   * `results` will be sent, and this represents the time at which the operation
+   * was run.
+   * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExecutionTimeOrBuilder() { + return executionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : executionTime_; + } + + public static final int EXPLAIN_STATS_FIELD_NUMBER = 4; + private com.google.firestore.v1.ExplainStats explainStats_; + + /** + * + * + *
+   * Query explain stats.
+   *
+   * Contains all metadata related to pipeline planning and execution, specific
+   * contents depend on the supplied pipeline options.
+   * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + * + * @return Whether the explainStats field is set. + */ + @java.lang.Override + public boolean hasExplainStats() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Query explain stats.
+   *
+   * Contains all metadata related to pipeline planning and execution, specific
+   * contents depend on the supplied pipeline options.
+   * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + * + * @return The explainStats. + */ + @java.lang.Override + public com.google.firestore.v1.ExplainStats getExplainStats() { + return explainStats_ == null + ? com.google.firestore.v1.ExplainStats.getDefaultInstance() + : explainStats_; + } + + /** + * + * + *
+   * Query explain stats.
+   *
+   * Contains all metadata related to pipeline planning and execution, specific
+   * contents depend on the supplied pipeline options.
+   * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + @java.lang.Override + public com.google.firestore.v1.ExplainStatsOrBuilder getExplainStatsOrBuilder() { + return explainStats_ == null + ? com.google.firestore.v1.ExplainStats.getDefaultInstance() + : explainStats_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!transaction_.isEmpty()) { + output.writeBytes(1, transaction_); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(2, results_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getExecutionTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getExplainStats()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!transaction_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, transaction_); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, results_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExecutionTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExplainStats()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.ExecutePipelineResponse)) { + return super.equals(obj); + } + com.google.firestore.v1.ExecutePipelineResponse other = + (com.google.firestore.v1.ExecutePipelineResponse) obj; + + if (!getTransaction().equals(other.getTransaction())) return false; + if (!getResultsList().equals(other.getResultsList())) return false; + if (hasExecutionTime() != other.hasExecutionTime()) return false; + if (hasExecutionTime()) { + if (!getExecutionTime().equals(other.getExecutionTime())) return false; + } + if (hasExplainStats() != other.hasExplainStats()) return false; + if (hasExplainStats()) { + if (!getExplainStats().equals(other.getExplainStats())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (hasExecutionTime()) { + hash = (37 * hash) + EXECUTION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTime().hashCode(); + } + if (hasExplainStats()) { + hash = (37 * hash) + EXPLAIN_STATS_FIELD_NUMBER; + hash = (53 * hash) + getExplainStats().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExecutePipelineResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.ExecutePipelineResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for [Firestore.Execute][].
+   * 
+ * + * Protobuf type {@code google.firestore.v1.ExecutePipelineResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.ExecutePipelineResponse) + com.google.firestore.v1.ExecutePipelineResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.ExecutePipelineResponse.class, + com.google.firestore.v1.ExecutePipelineResponse.Builder.class); + } + + // Construct using com.google.firestore.v1.ExecutePipelineResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + getExecutionTimeFieldBuilder(); + getExplainStatsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + transaction_ = com.google.protobuf.ByteString.EMPTY; + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + } else { + results_ = null; + resultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + executionTime_ = null; + if (executionTimeBuilder_ != null) { + executionTimeBuilder_.dispose(); + executionTimeBuilder_ = null; + } + explainStats_ = null; + if (explainStatsBuilder_ != null) { + explainStatsBuilder_.dispose(); + explainStatsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_ExecutePipelineResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineResponse getDefaultInstanceForType() { + return com.google.firestore.v1.ExecutePipelineResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineResponse build() { + com.google.firestore.v1.ExecutePipelineResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineResponse buildPartial() { + com.google.firestore.v1.ExecutePipelineResponse result = + new com.google.firestore.v1.ExecutePipelineResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.firestore.v1.ExecutePipelineResponse result) { + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.firestore.v1.ExecutePipelineResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.transaction_ = transaction_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.executionTime_ = + executionTimeBuilder_ == null ? executionTime_ : executionTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.explainStats_ = + explainStatsBuilder_ == null ? explainStats_ : explainStatsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.ExecutePipelineResponse) { + return mergeFrom((com.google.firestore.v1.ExecutePipelineResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.ExecutePipelineResponse other) { + if (other == com.google.firestore.v1.ExecutePipelineResponse.getDefaultInstance()) + return this; + if (other.getTransaction() != com.google.protobuf.ByteString.EMPTY) { + setTransaction(other.getTransaction()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000002); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (other.hasExecutionTime()) { + mergeExecutionTime(other.getExecutionTime()); + } + if (other.hasExplainStats()) { + mergeExplainStats(other.getExplainStats()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + transaction_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.firestore.v1.Document m = + input.readMessage(com.google.firestore.v1.Document.parser(), extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getExecutionTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getExplainStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * Newly created transaction identifier.
+     *
+     * This field is only specified as part of the first response from the server,
+     * alongside the `results` field when the original request specified
+     * [ExecuteRequest.new_transaction][].
+     * 
+ * + * bytes transaction = 1; + * + * @return The transaction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransaction() { + return transaction_; + } + + /** + * + * + *
+     * Newly created transaction identifier.
+     *
+     * This field is only specified as part of the first response from the server,
+     * alongside the `results` field when the original request specified
+     * [ExecuteRequest.new_transaction][].
+     * 
+ * + * bytes transaction = 1; + * + * @param value The transaction to set. + * @return This builder for chaining. + */ + public Builder setTransaction(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Newly created transaction identifier.
+     *
+     * This field is only specified as part of the first response from the server,
+     * alongside the `results` field when the original request specified
+     * [ExecuteRequest.new_transaction][].
+     * 
+ * + * bytes transaction = 1; + * + * @return This builder for chaining. + */ + public Builder clearTransaction() { + bitField0_ = (bitField0_ & ~0x00000001); + transaction_ = getDefaultInstance().getTransaction(); + onChanged(); + return this; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public com.google.firestore.v1.Document getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder setResults(int index, com.google.firestore.v1.Document value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder setResults(int index, com.google.firestore.v1.Document.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder addResults(com.google.firestore.v1.Document value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder addResults(int index, com.google.firestore.v1.Document value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder addResults(com.google.firestore.v1.Document.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder addResults(int index, com.google.firestore.v1.Document.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public com.google.firestore.v1.Document.Builder getResultsBuilder(int index) { + return getResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public com.google.firestore.v1.DocumentOrBuilder getResultsOrBuilder(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public com.google.firestore.v1.Document.Builder addResultsBuilder() { + return getResultsFieldBuilder() + .addBuilder(com.google.firestore.v1.Document.getDefaultInstance()); + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public com.google.firestore.v1.Document.Builder addResultsBuilder(int index) { + return getResultsFieldBuilder() + .addBuilder(index, com.google.firestore.v1.Document.getDefaultInstance()); + } + + /** + * + * + *
+     * An ordered batch of results returned executing a pipeline.
+     *
+     * The batch size is variable, and can even be zero for when only a partial
+     * progress message is returned.
+     *
+     * The fields present in the returned documents are only those that were
+     * explicitly requested in the pipeline, this include those like
+     * [`__name__`][google.firestore.v1.Document.name] &
+     * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+     * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+     * RPCs which always return such fields even when they are not specified in
+     * the [`mask`][google.firestore.v1.DocumentMask].
+     * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + public java.util.List getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder>( + results_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private com.google.protobuf.Timestamp executionTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + executionTimeBuilder_; + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + * + * @return Whether the executionTime field is set. + */ + public boolean hasExecutionTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + * + * @return The executionTime. + */ + public com.google.protobuf.Timestamp getExecutionTime() { + if (executionTimeBuilder_ == null) { + return executionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : executionTime_; + } else { + return executionTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + public Builder setExecutionTime(com.google.protobuf.Timestamp value) { + if (executionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTime_ = value; + } else { + executionTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + public Builder setExecutionTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (executionTimeBuilder_ == null) { + executionTime_ = builderForValue.build(); + } else { + executionTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + public Builder mergeExecutionTime(com.google.protobuf.Timestamp value) { + if (executionTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && executionTime_ != null + && executionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExecutionTimeBuilder().mergeFrom(value); + } else { + executionTime_ = value; + } + } else { + executionTimeBuilder_.mergeFrom(value); + } + if (executionTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + public Builder clearExecutionTime() { + bitField0_ = (bitField0_ & ~0x00000004); + executionTime_ = null; + if (executionTimeBuilder_ != null) { + executionTimeBuilder_.dispose(); + executionTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getExecutionTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getExecutionTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getExecutionTimeOrBuilder() { + if (executionTimeBuilder_ != null) { + return executionTimeBuilder_.getMessageOrBuilder(); + } else { + return executionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : executionTime_; + } + } + + /** + * + * + *
+     * The time at which the document(s) were read.
+     *
+     * This may be monotonically increasing; in this case, the previous documents
+     * in the result stream are guaranteed not to have changed between their
+     * `execution_time` and this one.
+     *
+     * If the query returns no results, a response with `execution_time` and no
+     * `results` will be sent, and this represents the time at which the operation
+     * was run.
+     * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExecutionTimeFieldBuilder() { + if (executionTimeBuilder_ == null) { + executionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExecutionTime(), getParentForChildren(), isClean()); + executionTime_ = null; + } + return executionTimeBuilder_; + } + + private com.google.firestore.v1.ExplainStats explainStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.ExplainStats, + com.google.firestore.v1.ExplainStats.Builder, + com.google.firestore.v1.ExplainStatsOrBuilder> + explainStatsBuilder_; + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + * + * @return Whether the explainStats field is set. + */ + public boolean hasExplainStats() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + * + * @return The explainStats. + */ + public com.google.firestore.v1.ExplainStats getExplainStats() { + if (explainStatsBuilder_ == null) { + return explainStats_ == null + ? com.google.firestore.v1.ExplainStats.getDefaultInstance() + : explainStats_; + } else { + return explainStatsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + public Builder setExplainStats(com.google.firestore.v1.ExplainStats value) { + if (explainStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + explainStats_ = value; + } else { + explainStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + public Builder setExplainStats(com.google.firestore.v1.ExplainStats.Builder builderForValue) { + if (explainStatsBuilder_ == null) { + explainStats_ = builderForValue.build(); + } else { + explainStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + public Builder mergeExplainStats(com.google.firestore.v1.ExplainStats value) { + if (explainStatsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && explainStats_ != null + && explainStats_ != com.google.firestore.v1.ExplainStats.getDefaultInstance()) { + getExplainStatsBuilder().mergeFrom(value); + } else { + explainStats_ = value; + } + } else { + explainStatsBuilder_.mergeFrom(value); + } + if (explainStats_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + public Builder clearExplainStats() { + bitField0_ = (bitField0_ & ~0x00000008); + explainStats_ = null; + if (explainStatsBuilder_ != null) { + explainStatsBuilder_.dispose(); + explainStatsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + public com.google.firestore.v1.ExplainStats.Builder getExplainStatsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExplainStatsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + public com.google.firestore.v1.ExplainStatsOrBuilder getExplainStatsOrBuilder() { + if (explainStatsBuilder_ != null) { + return explainStatsBuilder_.getMessageOrBuilder(); + } else { + return explainStats_ == null + ? com.google.firestore.v1.ExplainStats.getDefaultInstance() + : explainStats_; + } + } + + /** + * + * + *
+     * Query explain stats.
+     *
+     * Contains all metadata related to pipeline planning and execution, specific
+     * contents depend on the supplied pipeline options.
+     * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.ExplainStats, + com.google.firestore.v1.ExplainStats.Builder, + com.google.firestore.v1.ExplainStatsOrBuilder> + getExplainStatsFieldBuilder() { + if (explainStatsBuilder_ == null) { + explainStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.ExplainStats, + com.google.firestore.v1.ExplainStats.Builder, + com.google.firestore.v1.ExplainStatsOrBuilder>( + getExplainStats(), getParentForChildren(), isClean()); + explainStats_ = null; + } + return explainStatsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.ExecutePipelineResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.ExecutePipelineResponse) + private static final com.google.firestore.v1.ExecutePipelineResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.ExecutePipelineResponse(); + } + + public static com.google.firestore.v1.ExecutePipelineResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutePipelineResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.ExecutePipelineResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineResponseOrBuilder.java new file mode 100644 index 000000000..e99f31e2d --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutePipelineResponseOrBuilder.java @@ -0,0 +1,260 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public interface ExecutePipelineResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.ExecutePipelineResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Newly created transaction identifier.
+   *
+   * This field is only specified as part of the first response from the server,
+   * alongside the `results` field when the original request specified
+   * [ExecuteRequest.new_transaction][].
+   * 
+ * + * bytes transaction = 1; + * + * @return The transaction. + */ + com.google.protobuf.ByteString getTransaction(); + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + java.util.List getResultsList(); + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + com.google.firestore.v1.Document getResults(int index); + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + int getResultsCount(); + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + java.util.List getResultsOrBuilderList(); + + /** + * + * + *
+   * An ordered batch of results returned executing a pipeline.
+   *
+   * The batch size is variable, and can even be zero for when only a partial
+   * progress message is returned.
+   *
+   * The fields present in the returned documents are only those that were
+   * explicitly requested in the pipeline, this include those like
+   * [`__name__`][google.firestore.v1.Document.name] &
+   * [`__update_time__`][google.firestore.v1.Document.update_time]. This is
+   * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument`
+   * RPCs which always return such fields even when they are not specified in
+   * the [`mask`][google.firestore.v1.DocumentMask].
+   * 
+ * + * repeated .google.firestore.v1.Document results = 2; + */ + com.google.firestore.v1.DocumentOrBuilder getResultsOrBuilder(int index); + + /** + * + * + *
+   * The time at which the document(s) were read.
+   *
+   * This may be monotonically increasing; in this case, the previous documents
+   * in the result stream are guaranteed not to have changed between their
+   * `execution_time` and this one.
+   *
+   * If the query returns no results, a response with `execution_time` and no
+   * `results` will be sent, and this represents the time at which the operation
+   * was run.
+   * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + * + * @return Whether the executionTime field is set. + */ + boolean hasExecutionTime(); + + /** + * + * + *
+   * The time at which the document(s) were read.
+   *
+   * This may be monotonically increasing; in this case, the previous documents
+   * in the result stream are guaranteed not to have changed between their
+   * `execution_time` and this one.
+   *
+   * If the query returns no results, a response with `execution_time` and no
+   * `results` will be sent, and this represents the time at which the operation
+   * was run.
+   * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + * + * @return The executionTime. + */ + com.google.protobuf.Timestamp getExecutionTime(); + + /** + * + * + *
+   * The time at which the document(s) were read.
+   *
+   * This may be monotonically increasing; in this case, the previous documents
+   * in the result stream are guaranteed not to have changed between their
+   * `execution_time` and this one.
+   *
+   * If the query returns no results, a response with `execution_time` and no
+   * `results` will be sent, and this represents the time at which the operation
+   * was run.
+   * 
+ * + * .google.protobuf.Timestamp execution_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getExecutionTimeOrBuilder(); + + /** + * + * + *
+   * Query explain stats.
+   *
+   * Contains all metadata related to pipeline planning and execution, specific
+   * contents depend on the supplied pipeline options.
+   * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + * + * @return Whether the explainStats field is set. + */ + boolean hasExplainStats(); + + /** + * + * + *
+   * Query explain stats.
+   *
+   * Contains all metadata related to pipeline planning and execution, specific
+   * contents depend on the supplied pipeline options.
+   * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + * + * @return The explainStats. + */ + com.google.firestore.v1.ExplainStats getExplainStats(); + + /** + * + * + *
+   * Query explain stats.
+   *
+   * Contains all metadata related to pipeline planning and execution, specific
+   * contents depend on the supplied pipeline options.
+   * 
+ * + * .google.firestore.v1.ExplainStats explain_stats = 4; + */ + com.google.firestore.v1.ExplainStatsOrBuilder getExplainStatsOrBuilder(); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStats.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStats.java index 0453944ab..b8cdd2d44 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStats.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStats.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class ExecutionStats extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.ExecutionStats) ExecutionStatsOrBuilder { private static final long serialVersionUID = 0L; + // Use ExecutionStats.newBuilder() to construct. private ExecutionStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int RESULTS_RETURNED_FIELD_NUMBER = 1; private long resultsReturned_ = 0L; + /** * * @@ -83,6 +85,7 @@ public long getResultsReturned() { public static final int EXECUTION_DURATION_FIELD_NUMBER = 3; private com.google.protobuf.Duration executionDuration_; + /** * * @@ -98,6 +101,7 @@ public long getResultsReturned() { public boolean hasExecutionDuration() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -115,6 +119,7 @@ public com.google.protobuf.Duration getExecutionDuration() { ? com.google.protobuf.Duration.getDefaultInstance() : executionDuration_; } + /** * * @@ -133,6 +138,7 @@ public com.google.protobuf.DurationOrBuilder getExecutionDurationOrBuilder() { public static final int READ_OPERATIONS_FIELD_NUMBER = 4; private long readOperations_ = 0L; + /** * * @@ -151,6 +157,7 @@ public long getReadOperations() { public static final int DEBUG_STATS_FIELD_NUMBER = 5; private com.google.protobuf.Struct debugStats_; + /** * * @@ -177,6 +184,7 @@ public long getReadOperations() { public boolean hasDebugStats() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -203,6 +211,7 @@ public boolean hasDebugStats() { public com.google.protobuf.Struct getDebugStats() { return debugStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : debugStats_; } + /** * * @@ -423,6 +432,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -669,6 +679,7 @@ public Builder mergeFrom( private int bitField0_; private long resultsReturned_; + /** * * @@ -685,6 +696,7 @@ public Builder mergeFrom( public long getResultsReturned() { return resultsReturned_; } + /** * * @@ -705,6 +717,7 @@ public Builder setResultsReturned(long value) { onChanged(); return this; } + /** * * @@ -730,6 +743,7 @@ public Builder clearResultsReturned() { com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> executionDurationBuilder_; + /** * * @@ -744,6 +758,7 @@ public Builder clearResultsReturned() { public boolean hasExecutionDuration() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -764,6 +779,7 @@ public com.google.protobuf.Duration getExecutionDuration() { return executionDurationBuilder_.getMessage(); } } + /** * * @@ -786,6 +802,7 @@ public Builder setExecutionDuration(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -805,6 +822,7 @@ public Builder setExecutionDuration(com.google.protobuf.Duration.Builder builder onChanged(); return this; } + /** * * @@ -832,6 +850,7 @@ public Builder mergeExecutionDuration(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -851,6 +870,7 @@ public Builder clearExecutionDuration() { onChanged(); return this; } + /** * * @@ -865,6 +885,7 @@ public com.google.protobuf.Duration.Builder getExecutionDurationBuilder() { onChanged(); return getExecutionDurationFieldBuilder().getBuilder(); } + /** * * @@ -883,6 +904,7 @@ public com.google.protobuf.DurationOrBuilder getExecutionDurationOrBuilder() { : executionDuration_; } } + /** * * @@ -910,6 +932,7 @@ public com.google.protobuf.DurationOrBuilder getExecutionDurationOrBuilder() { } private long readOperations_; + /** * * @@ -925,6 +948,7 @@ public com.google.protobuf.DurationOrBuilder getExecutionDurationOrBuilder() { public long getReadOperations() { return readOperations_; } + /** * * @@ -944,6 +968,7 @@ public Builder setReadOperations(long value) { onChanged(); return this; } + /** * * @@ -968,6 +993,7 @@ public Builder clearReadOperations() { com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> debugStatsBuilder_; + /** * * @@ -993,6 +1019,7 @@ public Builder clearReadOperations() { public boolean hasDebugStats() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1022,6 +1049,7 @@ public com.google.protobuf.Struct getDebugStats() { return debugStatsBuilder_.getMessage(); } } + /** * * @@ -1055,6 +1083,7 @@ public Builder setDebugStats(com.google.protobuf.Struct value) { onChanged(); return this; } + /** * * @@ -1085,6 +1114,7 @@ public Builder setDebugStats(com.google.protobuf.Struct.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1123,6 +1153,7 @@ public Builder mergeDebugStats(com.google.protobuf.Struct value) { } return this; } + /** * * @@ -1153,6 +1184,7 @@ public Builder clearDebugStats() { onChanged(); return this; } + /** * * @@ -1178,6 +1210,7 @@ public com.google.protobuf.Struct.Builder getDebugStatsBuilder() { onChanged(); return getDebugStatsFieldBuilder().getBuilder(); } + /** * * @@ -1205,6 +1238,7 @@ public com.google.protobuf.StructOrBuilder getDebugStatsOrBuilder() { return debugStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : debugStats_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStatsOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStatsOrBuilder.java index ec86aab5e..f0e94ee0a 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStatsOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExecutionStatsOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ExecutionStatsOrBuilder @@ -50,6 +50,7 @@ public interface ExecutionStatsOrBuilder * @return Whether the executionDuration field is set. */ boolean hasExecutionDuration(); + /** * * @@ -62,6 +63,7 @@ public interface ExecutionStatsOrBuilder * @return The executionDuration. */ com.google.protobuf.Duration getExecutionDuration(); + /** * * @@ -109,6 +111,7 @@ public interface ExecutionStatsOrBuilder * @return Whether the debugStats field is set. */ boolean hasDebugStats(); + /** * * @@ -132,6 +135,7 @@ public interface ExecutionStatsOrBuilder * @return The debugStats. */ com.google.protobuf.Struct getDebugStats(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java index e6b018774..ca92f3122 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class ExistenceFilter extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.v1.ExistenceFilter) ExistenceFilterOrBuilder { private static final long serialVersionUID = 0L; + // Use ExistenceFilter.newBuilder() to construct. private ExistenceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int TARGET_ID_FIELD_NUMBER = 1; private int targetId_ = 0; + /** * * @@ -82,6 +84,7 @@ public int getTargetId() { public static final int COUNT_FIELD_NUMBER = 2; private int count_ = 0; + /** * * @@ -109,6 +112,7 @@ public int getCount() { public static final int UNCHANGED_NAMES_FIELD_NUMBER = 3; private com.google.firestore.v1.BloomFilter unchangedNames_; + /** * * @@ -134,6 +138,7 @@ public int getCount() { public boolean hasUnchangedNames() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -161,6 +166,7 @@ public com.google.firestore.v1.BloomFilter getUnchangedNames() { ? com.google.firestore.v1.BloomFilter.getDefaultInstance() : unchangedNames_; } + /** * * @@ -368,6 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -592,6 +599,7 @@ public Builder mergeFrom( private int bitField0_; private int targetId_; + /** * * @@ -607,6 +615,7 @@ public Builder mergeFrom( public int getTargetId() { return targetId_; } + /** * * @@ -626,6 +635,7 @@ public Builder setTargetId(int value) { onChanged(); return this; } + /** * * @@ -645,6 +655,7 @@ public Builder clearTargetId() { } private int count_; + /** * * @@ -669,6 +680,7 @@ public Builder clearTargetId() { public int getCount() { return count_; } + /** * * @@ -697,6 +709,7 @@ public Builder setCount(int value) { onChanged(); return this; } + /** * * @@ -730,6 +743,7 @@ public Builder clearCount() { com.google.firestore.v1.BloomFilter.Builder, com.google.firestore.v1.BloomFilterOrBuilder> unchangedNamesBuilder_; + /** * * @@ -754,6 +768,7 @@ public Builder clearCount() { public boolean hasUnchangedNames() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -784,6 +799,7 @@ public com.google.firestore.v1.BloomFilter getUnchangedNames() { return unchangedNamesBuilder_.getMessage(); } } + /** * * @@ -816,6 +832,7 @@ public Builder setUnchangedNames(com.google.firestore.v1.BloomFilter value) { onChanged(); return this; } + /** * * @@ -845,6 +862,7 @@ public Builder setUnchangedNames(com.google.firestore.v1.BloomFilter.Builder bui onChanged(); return this; } + /** * * @@ -882,6 +900,7 @@ public Builder mergeUnchangedNames(com.google.firestore.v1.BloomFilter value) { } return this; } + /** * * @@ -911,6 +930,7 @@ public Builder clearUnchangedNames() { onChanged(); return this; } + /** * * @@ -935,6 +955,7 @@ public com.google.firestore.v1.BloomFilter.Builder getUnchangedNamesBuilder() { onChanged(); return getUnchangedNamesFieldBuilder().getBuilder(); } + /** * * @@ -963,6 +984,7 @@ public com.google.firestore.v1.BloomFilterOrBuilder getUnchangedNamesOrBuilder() : unchangedNames_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java index 0236635ef..3276f0719 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ExistenceFilterOrBuilder @@ -81,6 +81,7 @@ public interface ExistenceFilterOrBuilder * @return Whether the unchangedNames field is set. */ boolean hasUnchangedNames(); + /** * * @@ -103,6 +104,7 @@ public interface ExistenceFilterOrBuilder * @return The unchangedNames. */ com.google.firestore.v1.BloomFilter getUnchangedNames(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetrics.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetrics.java index 4507ad57f..a92ced973 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetrics.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetrics.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class ExplainMetrics extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.ExplainMetrics) ExplainMetricsOrBuilder { private static final long serialVersionUID = 0L; + // Use ExplainMetrics.newBuilder() to construct. private ExplainMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int PLAN_SUMMARY_FIELD_NUMBER = 1; private com.google.firestore.v1.PlanSummary planSummary_; + /** * * @@ -79,6 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPlanSummary() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -96,6 +99,7 @@ public com.google.firestore.v1.PlanSummary getPlanSummary() { ? com.google.firestore.v1.PlanSummary.getDefaultInstance() : planSummary_; } + /** * * @@ -114,6 +118,7 @@ public com.google.firestore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder() { public static final int EXECUTION_STATS_FIELD_NUMBER = 2; private com.google.firestore.v1.ExecutionStats executionStats_; + /** * * @@ -131,6 +136,7 @@ public com.google.firestore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder() { public boolean hasExecutionStats() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -150,6 +156,7 @@ public com.google.firestore.v1.ExecutionStats getExecutionStats() { ? com.google.firestore.v1.ExecutionStats.getDefaultInstance() : executionStats_; } + /** * * @@ -345,6 +352,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -568,6 +576,7 @@ public Builder mergeFrom( com.google.firestore.v1.PlanSummary.Builder, com.google.firestore.v1.PlanSummaryOrBuilder> planSummaryBuilder_; + /** * * @@ -582,6 +591,7 @@ public Builder mergeFrom( public boolean hasPlanSummary() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -602,6 +612,7 @@ public com.google.firestore.v1.PlanSummary getPlanSummary() { return planSummaryBuilder_.getMessage(); } } + /** * * @@ -624,6 +635,7 @@ public Builder setPlanSummary(com.google.firestore.v1.PlanSummary value) { onChanged(); return this; } + /** * * @@ -643,6 +655,7 @@ public Builder setPlanSummary(com.google.firestore.v1.PlanSummary.Builder builde onChanged(); return this; } + /** * * @@ -670,6 +683,7 @@ public Builder mergePlanSummary(com.google.firestore.v1.PlanSummary value) { } return this; } + /** * * @@ -689,6 +703,7 @@ public Builder clearPlanSummary() { onChanged(); return this; } + /** * * @@ -703,6 +718,7 @@ public com.google.firestore.v1.PlanSummary.Builder getPlanSummaryBuilder() { onChanged(); return getPlanSummaryFieldBuilder().getBuilder(); } + /** * * @@ -721,6 +737,7 @@ public com.google.firestore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder() { : planSummary_; } } + /** * * @@ -753,6 +770,7 @@ public com.google.firestore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder() { com.google.firestore.v1.ExecutionStats.Builder, com.google.firestore.v1.ExecutionStatsOrBuilder> executionStatsBuilder_; + /** * * @@ -769,6 +787,7 @@ public com.google.firestore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder() { public boolean hasExecutionStats() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -791,6 +810,7 @@ public com.google.firestore.v1.ExecutionStats getExecutionStats() { return executionStatsBuilder_.getMessage(); } } + /** * * @@ -815,6 +835,7 @@ public Builder setExecutionStats(com.google.firestore.v1.ExecutionStats value) { onChanged(); return this; } + /** * * @@ -837,6 +858,7 @@ public Builder setExecutionStats( onChanged(); return this; } + /** * * @@ -866,6 +888,7 @@ public Builder mergeExecutionStats(com.google.firestore.v1.ExecutionStats value) } return this; } + /** * * @@ -887,6 +910,7 @@ public Builder clearExecutionStats() { onChanged(); return this; } + /** * * @@ -903,6 +927,7 @@ public com.google.firestore.v1.ExecutionStats.Builder getExecutionStatsBuilder() onChanged(); return getExecutionStatsFieldBuilder().getBuilder(); } + /** * * @@ -923,6 +948,7 @@ public com.google.firestore.v1.ExecutionStatsOrBuilder getExecutionStatsOrBuilde : executionStats_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetricsOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetricsOrBuilder.java index b66033555..9c1026198 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetricsOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainMetricsOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ExplainMetricsOrBuilder @@ -36,6 +36,7 @@ public interface ExplainMetricsOrBuilder * @return Whether the planSummary field is set. */ boolean hasPlanSummary(); + /** * * @@ -48,6 +49,7 @@ public interface ExplainMetricsOrBuilder * @return The planSummary. */ com.google.firestore.v1.PlanSummary getPlanSummary(); + /** * * @@ -73,6 +75,7 @@ public interface ExplainMetricsOrBuilder * @return Whether the executionStats field is set. */ boolean hasExecutionStats(); + /** * * @@ -87,6 +90,7 @@ public interface ExplainMetricsOrBuilder * @return The executionStats. */ com.google.firestore.v1.ExecutionStats getExecutionStats(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptions.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptions.java index 6e18d6a65..004ccaa52 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptions.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptions.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class ExplainOptions extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.ExplainOptions) ExplainOptionsOrBuilder { private static final long serialVersionUID = 0L; + // Use ExplainOptions.newBuilder() to construct. private ExplainOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int ANALYZE_FIELD_NUMBER = 1; private boolean analyze_ = false; + /** * * @@ -243,6 +245,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -424,6 +427,7 @@ public Builder mergeFrom( private int bitField0_; private boolean analyze_; + /** * * @@ -445,6 +449,7 @@ public Builder mergeFrom( public boolean getAnalyze() { return analyze_; } + /** * * @@ -470,6 +475,7 @@ public Builder setAnalyze(boolean value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptionsOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptionsOrBuilder.java index 80a82dee4..18cde8fc4 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptionsOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainOptionsOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ExplainOptionsOrBuilder diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStats.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStats.java new file mode 100644 index 000000000..b6f7feb52 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStats.java @@ -0,0 +1,748 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/explain_stats.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +/** + * + * + *
+ * Explain stats for an RPC request, includes both the optimized plan and
+ * execution stats.
+ * 
+ * + * Protobuf type {@code google.firestore.v1.ExplainStats} + */ +public final class ExplainStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.ExplainStats) + ExplainStatsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExplainStats.newBuilder() to construct. + private ExplainStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExplainStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExplainStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.ExplainStatsProto + .internal_static_google_firestore_v1_ExplainStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.ExplainStatsProto + .internal_static_google_firestore_v1_ExplainStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.ExplainStats.class, + com.google.firestore.v1.ExplainStats.Builder.class); + } + + private int bitField0_; + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.Any data_; + + /** + * + * + *
+   * The format depends on the `output_format` options in the request.
+   *
+   * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+   * 
+ * + * .google.protobuf.Any data = 1; + * + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The format depends on the `output_format` options in the request.
+   *
+   * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+   * 
+ * + * .google.protobuf.Any data = 1; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.Any getData() { + return data_ == null ? com.google.protobuf.Any.getDefaultInstance() : data_; + } + + /** + * + * + *
+   * The format depends on the `output_format` options in the request.
+   *
+   * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+   * 
+ * + * .google.protobuf.Any data = 1; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getDataOrBuilder() { + return data_ == null ? com.google.protobuf.Any.getDefaultInstance() : data_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getData()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getData()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.ExplainStats)) { + return super.equals(obj); + } + com.google.firestore.v1.ExplainStats other = (com.google.firestore.v1.ExplainStats) obj; + + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData().equals(other.getData())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.ExplainStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExplainStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExplainStats parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExplainStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExplainStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.ExplainStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.ExplainStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExplainStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.ExplainStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExplainStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.ExplainStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.ExplainStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.ExplainStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Explain stats for an RPC request, includes both the optimized plan and
+   * execution stats.
+   * 
+ * + * Protobuf type {@code google.firestore.v1.ExplainStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.ExplainStats) + com.google.firestore.v1.ExplainStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.ExplainStatsProto + .internal_static_google_firestore_v1_ExplainStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.ExplainStatsProto + .internal_static_google_firestore_v1_ExplainStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.ExplainStats.class, + com.google.firestore.v1.ExplainStats.Builder.class); + } + + // Construct using com.google.firestore.v1.ExplainStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.ExplainStatsProto + .internal_static_google_firestore_v1_ExplainStats_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.ExplainStats getDefaultInstanceForType() { + return com.google.firestore.v1.ExplainStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.ExplainStats build() { + com.google.firestore.v1.ExplainStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.ExplainStats buildPartial() { + com.google.firestore.v1.ExplainStats result = new com.google.firestore.v1.ExplainStats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.v1.ExplainStats result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.data_ = dataBuilder_ == null ? data_ : dataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.ExplainStats) { + return mergeFrom((com.google.firestore.v1.ExplainStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.ExplainStats other) { + if (other == com.google.firestore.v1.ExplainStats.getDefaultInstance()) return this; + if (other.hasData()) { + mergeData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Any data_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + dataBuilder_; + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + * + * @return Whether the data field is set. + */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + * + * @return The data. + */ + public com.google.protobuf.Any getData() { + if (dataBuilder_ == null) { + return data_ == null ? com.google.protobuf.Any.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + */ + public Builder setData(com.google.protobuf.Any value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + } else { + dataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + */ + public Builder setData(com.google.protobuf.Any.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + */ + public Builder mergeData(com.google.protobuf.Any value) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && data_ != null + && data_ != com.google.protobuf.Any.getDefaultInstance()) { + getDataBuilder().mergeFrom(value); + } else { + data_ = value; + } + } else { + dataBuilder_.mergeFrom(value); + } + if (data_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000001); + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + */ + public com.google.protobuf.Any.Builder getDataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + */ + public com.google.protobuf.AnyOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? com.google.protobuf.Any.getDefaultInstance() : data_; + } + } + + /** + * + * + *
+     * The format depends on the `output_format` options in the request.
+     *
+     * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+     * 
+ * + * .google.protobuf.Any data = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>(getData(), getParentForChildren(), isClean()); + data_ = null; + } + return dataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.ExplainStats) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.ExplainStats) + private static final com.google.firestore.v1.ExplainStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.ExplainStats(); + } + + public static com.google.firestore.v1.ExplainStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExplainStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.ExplainStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStatsOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStatsOrBuilder.java new file mode 100644 index 000000000..0467608ec --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStatsOrBuilder.java @@ -0,0 +1,69 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/explain_stats.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public interface ExplainStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.ExplainStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The format depends on the `output_format` options in the request.
+   *
+   * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+   * 
+ * + * .google.protobuf.Any data = 1; + * + * @return Whether the data field is set. + */ + boolean hasData(); + + /** + * + * + *
+   * The format depends on the `output_format` options in the request.
+   *
+   * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+   * 
+ * + * .google.protobuf.Any data = 1; + * + * @return The data. + */ + com.google.protobuf.Any getData(); + + /** + * + * + *
+   * The format depends on the `output_format` options in the request.
+   *
+   * The only option today is `TEXT`, which is a `google.protobuf.StringValue`.
+   * 
+ * + * .google.protobuf.Any data = 1; + */ + com.google.protobuf.AnyOrBuilder getDataOrBuilder(); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStatsProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStatsProto.java new file mode 100644 index 000000000..ee449fae6 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExplainStatsProto.java @@ -0,0 +1,72 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/explain_stats.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public final class ExplainStatsProto { + private ExplainStatsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_ExplainStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_ExplainStats_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/firestore/v1/explain_stats.prot" + + "o\022\023google.firestore.v1\032\031google/protobuf/" + + "any.proto\"2\n\014ExplainStats\022\"\n\004data\030\001 \001(\0132" + + "\024.google.protobuf.AnyB\302\001\n\027com.google.fir" + + "estore.v1B\021ExplainStatsProtoP\001Z;cloud.go" + + "ogle.com/go/firestore/apiv1/firestorepb;" + + "firestorepb\252\002\031Google.Cloud.Firestore.V1\312" + + "\002\031Google\\Cloud\\Firestore\\V1\352\002\034Google::Cl" + + "oud::Firestore::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_google_firestore_v1_ExplainStats_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_v1_ExplainStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_ExplainStats_descriptor, + new java.lang.String[] { + "Data", + }); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java index dcc7ca8de..24a141cda 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class FirestoreProto { @@ -88,6 +88,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1_RunQueryResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_RunQueryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_ExecutePipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_ExecutePipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_ExecutePipelineResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_ExecutePipelineResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1_RunAggregationQueryRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -176,252 +184,275 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n#google/firestore/v1/firestore.proto\022\023g" + "oogle.firestore.v1\032\034google/api/annotatio" + "ns.proto\032\027google/api/client.proto\032\037googl" - + "e/api/field_behavior.proto\032,google/fires" - + "tore/v1/aggregation_result.proto\032 google" - + "/firestore/v1/common.proto\032\"google/fires" - + "tore/v1/document.proto\032\037google/firestore" - + "/v1/query.proto\032\'google/firestore/v1/que" - + "ry_profile.proto\032\037google/firestore/v1/wr" - + "ite.proto\032\033google/protobuf/empty.proto\032\037" - + "google/protobuf/timestamp.proto\032\036google/" - + "protobuf/wrappers.proto\032\027google/rpc/stat" - + "us.proto\"\270\001\n\022GetDocumentRequest\022\021\n\004name\030" - + "\001 \001(\tB\003\340A\002\022/\n\004mask\030\002 \001(\0132!.google.firest" - + "ore.v1.DocumentMask\022\025\n\013transaction\030\003 \001(\014" - + "H\000\022/\n\tread_time\030\005 \001(\0132\032.google.protobuf." - + "TimestampH\000B\026\n\024consistency_selector\"\273\002\n\024" - + "ListDocumentsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A" - + "\002\022\032\n\rcollection_id\030\002 \001(\tB\003\340A\001\022\026\n\tpage_si" - + "ze\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\022\025" - + "\n\010order_by\030\006 \001(\tB\003\340A\001\0224\n\004mask\030\007 \001(\0132!.go" - + "ogle.firestore.v1.DocumentMaskB\003\340A\001\022\025\n\013t" - + "ransaction\030\010 \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032." - + "google.protobuf.TimestampH\000\022\024\n\014show_miss" - + "ing\030\014 \001(\010B\026\n\024consistency_selector\"b\n\025Lis" - + "tDocumentsResponse\0220\n\tdocuments\030\001 \003(\0132\035." - + "google.firestore.v1.Document\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\304\001\n\025CreateDocumentRequest\022" - + "\023\n\006parent\030\001 \001(\tB\003\340A\002\022\032\n\rcollection_id\030\002 " - + "\001(\tB\003\340A\002\022\023\n\013document_id\030\003 \001(\t\0224\n\010documen" - + "t\030\004 \001(\0132\035.google.firestore.v1.DocumentB\003" - + "\340A\002\022/\n\004mask\030\005 \001(\0132!.google.firestore.v1." - + "DocumentMask\"\363\001\n\025UpdateDocumentRequest\0224" - + "\n\010document\030\001 \001(\0132\035.google.firestore.v1.D" - + "ocumentB\003\340A\002\0226\n\013update_mask\030\002 \001(\0132!.goog" - + "le.firestore.v1.DocumentMask\022/\n\004mask\030\003 \001" - + "(\0132!.google.firestore.v1.DocumentMask\022;\n" - + "\020current_document\030\004 \001(\0132!.google.firesto" - + "re.v1.Precondition\"g\n\025DeleteDocumentRequ" - + "est\022\021\n\004name\030\001 \001(\tB\003\340A\002\022;\n\020current_docume" - + "nt\030\002 \001(\0132!.google.firestore.v1.Precondit" - + "ion\"\231\002\n\030BatchGetDocumentsRequest\022\025\n\010data" - + "base\030\001 \001(\tB\003\340A\002\022\021\n\tdocuments\030\002 \003(\t\022/\n\004ma" - + "sk\030\003 \001(\0132!.google.firestore.v1.DocumentM" - + "ask\022\025\n\013transaction\030\004 \001(\014H\000\022B\n\017new_transa" - + "ction\030\005 \001(\0132\'.google.firestore.v1.Transa" - + "ctionOptionsH\000\022/\n\tread_time\030\007 \001(\0132\032.goog" - + "le.protobuf.TimestampH\000B\026\n\024consistency_s" - + "elector\"\254\001\n\031BatchGetDocumentsResponse\022.\n" - + "\005found\030\001 \001(\0132\035.google.firestore.v1.Docum" - + "entH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013transaction\030" - + "\003 \001(\014\022-\n\tread_time\030\004 \001(\0132\032.google.protob" - + "uf.TimestampB\010\n\006result\"j\n\027BeginTransacti" - + "onRequest\022\025\n\010database\030\001 \001(\tB\003\340A\002\0228\n\007opti" - + "ons\030\002 \001(\0132\'.google.firestore.v1.Transact" - + "ionOptions\"/\n\030BeginTransactionResponse\022\023" - + "\n\013transaction\030\001 \001(\014\"g\n\rCommitRequest\022\025\n\010" - + "database\030\001 \001(\tB\003\340A\002\022*\n\006writes\030\002 \003(\0132\032.go" - + "ogle.firestore.v1.Write\022\023\n\013transaction\030\003" - + " \001(\014\"z\n\016CommitResponse\0227\n\rwrite_results\030" - + "\001 \003(\0132 .google.firestore.v1.WriteResult\022" - + "/\n\013commit_time\030\002 \001(\0132\032.google.protobuf.T" - + "imestamp\"B\n\017RollbackRequest\022\025\n\010database\030" - + "\001 \001(\tB\003\340A\002\022\030\n\013transaction\030\002 \001(\014B\003\340A\002\"\335\002\n" - + "\017RunQueryRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022@\n" - + "\020structured_query\030\002 \001(\0132$.google.firesto" - + "re.v1.StructuredQueryH\000\022\025\n\013transaction\030\005" - + " \001(\014H\001\022B\n\017new_transaction\030\006 \001(\0132\'.google" - + ".firestore.v1.TransactionOptionsH\001\022/\n\tre" - + "ad_time\030\007 \001(\0132\032.google.protobuf.Timestam" - + "pH\001\022A\n\017explain_options\030\n \001(\0132#.google.fi" - + "restore.v1.ExplainOptionsB\003\340A\001B\014\n\nquery_" - + "typeB\026\n\024consistency_selector\"\207\002\n\020RunQuer" - + "yResponse\022\023\n\013transaction\030\002 \001(\014\022/\n\010docume" - + "nt\030\001 \001(\0132\035.google.firestore.v1.Document\022" - + "-\n\tread_time\030\003 \001(\0132\032.google.protobuf.Tim" - + "estamp\022\027\n\017skipped_results\030\004 \001(\005\022\016\n\004done\030" - + "\006 \001(\010H\000\022<\n\017explain_metrics\030\013 \001(\0132#.googl" - + "e.firestore.v1.ExplainMetricsB\027\n\025continu" - + "ation_selector\"\377\002\n\032RunAggregationQueryRe" - + "quest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022W\n\034structured" - + "_aggregation_query\030\002 \001(\0132/.google.firest" - + "ore.v1.StructuredAggregationQueryH\000\022\025\n\013t" - + "ransaction\030\004 \001(\014H\001\022B\n\017new_transaction\030\005 " - + "\001(\0132\'.google.firestore.v1.TransactionOpt" - + "ionsH\001\022/\n\tread_time\030\006 \001(\0132\032.google.proto" - + "buf.TimestampH\001\022A\n\017explain_options\030\010 \001(\013" - + "2#.google.firestore.v1.ExplainOptionsB\003\340" - + "A\001B\014\n\nquery_typeB\026\n\024consistency_selector" - + "\"\327\001\n\033RunAggregationQueryResponse\0226\n\006resu" - + "lt\030\001 \001(\0132&.google.firestore.v1.Aggregati" - + "onResult\022\023\n\013transaction\030\002 \001(\014\022-\n\tread_ti" - + "me\030\003 \001(\0132\032.google.protobuf.Timestamp\022<\n\017" - + "explain_metrics\030\n \001(\0132#.google.firestore" - + ".v1.ExplainMetrics\"\205\002\n\025PartitionQueryReq" - + "uest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022@\n\020structured_" - + "query\030\002 \001(\0132$.google.firestore.v1.Struct" - + "uredQueryH\000\022\027\n\017partition_count\030\003 \001(\003\022\022\n\n" - + "page_token\030\004 \001(\t\022\021\n\tpage_size\030\005 \001(\005\022/\n\tr" - + "ead_time\030\006 \001(\0132\032.google.protobuf.Timesta" - + "mpH\001B\014\n\nquery_typeB\026\n\024consistency_select" - + "or\"b\n\026PartitionQueryResponse\022/\n\npartitio" - + "ns\030\001 \003(\0132\033.google.firestore.v1.Cursor\022\027\n" - + "\017next_page_token\030\002 \001(\t\"\350\001\n\014WriteRequest\022" - + "\025\n\010database\030\001 \001(\tB\003\340A\002\022\021\n\tstream_id\030\002 \001(" - + "\t\022*\n\006writes\030\003 \003(\0132\032.google.firestore.v1." - + "Write\022\024\n\014stream_token\030\004 \001(\014\022=\n\006labels\030\005 " - + "\003(\0132-.google.firestore.v1.WriteRequest.L" - + "abelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\t:\0028\001\"\242\001\n\rWriteResponse\022\021\n\ts" - + "tream_id\030\001 \001(\t\022\024\n\014stream_token\030\002 \001(\014\0227\n\r" - + "write_results\030\003 \003(\0132 .google.firestore.v" - + "1.WriteResult\022/\n\013commit_time\030\004 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\"\362\001\n\rListenRequest" - + "\022\025\n\010database\030\001 \001(\tB\003\340A\002\0221\n\nadd_target\030\002 " - + "\001(\0132\033.google.firestore.v1.TargetH\000\022\027\n\rre" - + "move_target\030\003 \001(\005H\000\022>\n\006labels\030\004 \003(\0132..go" - + "ogle.firestore.v1.ListenRequest.LabelsEn" - + "try\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001B\017\n\rtarget_change\"\325\002\n\016ListenRe" - + "sponse\022:\n\rtarget_change\030\002 \001(\0132!.google.f" - + "irestore.v1.TargetChangeH\000\022>\n\017document_c" - + "hange\030\003 \001(\0132#.google.firestore.v1.Docume" - + "ntChangeH\000\022>\n\017document_delete\030\004 \001(\0132#.go" - + "ogle.firestore.v1.DocumentDeleteH\000\022>\n\017do" - + "cument_remove\030\006 \001(\0132#.google.firestore.v" - + "1.DocumentRemoveH\000\0226\n\006filter\030\005 \001(\0132$.goo" - + "gle.firestore.v1.ExistenceFilterH\000B\017\n\rre" - + "sponse_type\"\326\003\n\006Target\0228\n\005query\030\002 \001(\0132\'." - + "google.firestore.v1.Target.QueryTargetH\000" - + "\022@\n\tdocuments\030\003 \001(\0132+.google.firestore.v" - + "1.Target.DocumentsTargetH\000\022\026\n\014resume_tok" - + "en\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001(\0132\032.google.p" - + "rotobuf.TimestampH\001\022\021\n\ttarget_id\030\005 \001(\005\022\014" - + "\n\004once\030\006 \001(\010\0223\n\016expected_count\030\014 \001(\0132\033.g" - + "oogle.protobuf.Int32Value\032$\n\017DocumentsTa" - + "rget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013QueryTarget\022\016" - + "\n\006parent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(\013" - + "2$.google.firestore.v1.StructuredQueryH\000" - + "B\014\n\nquery_typeB\r\n\013target_typeB\r\n\013resume_" - + "type\"\252\002\n\014TargetChange\022N\n\022target_change_t" - + "ype\030\001 \001(\01622.google.firestore.v1.TargetCh" - + "ange.TargetChangeType\022\022\n\ntarget_ids\030\002 \003(" - + "\005\022!\n\005cause\030\003 \001(\0132\022.google.rpc.Status\022\024\n\014" - + "resume_token\030\004 \001(\014\022-\n\tread_time\030\006 \001(\0132\032." - + "google.protobuf.Timestamp\"N\n\020TargetChang" - + "eType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020" - + "\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"\237\001\n\030ListCollec" - + "tionIdsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tp" - + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022/\n\tre" - + "ad_time\030\004 \001(\0132\032.google.protobuf.Timestam" - + "pH\000B\026\n\024consistency_selector\"L\n\031ListColle" - + "ctionIdsResponse\022\026\n\016collection_ids\030\001 \003(\t" - + "\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n\021BatchWrite" - + "Request\022\025\n\010database\030\001 \001(\tB\003\340A\002\022*\n\006writes" - + "\030\002 \003(\0132\032.google.firestore.v1.Write\022B\n\006la" - + "bels\030\003 \003(\01322.google.firestore.v1.BatchWr" - + "iteRequest.LabelsEntry\032-\n\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"q\n\022BatchWr" - + "iteResponse\0227\n\rwrite_results\030\001 \003(\0132 .goo" - + "gle.firestore.v1.WriteResult\022\"\n\006status\030\002" - + " \003(\0132\022.google.rpc.Status2\332\031\n\tFirestore\022\217" - + "\001\n\013GetDocument\022\'.google.firestore.v1.Get" - + "DocumentRequest\032\035.google.firestore.v1.Do" - + "cument\"8\202\323\344\223\0022\0220/v1/{name=projects/*/dat" - + "abases/*/documents/*/**}\022\365\001\n\rListDocumen" - + "ts\022).google.firestore.v1.ListDocumentsRe" - + "quest\032*.google.firestore.v1.ListDocument" - + "sResponse\"\214\001\202\323\344\223\002\205\001\022B/v1/{parent=project" - + "s/*/databases/*/documents/*/**}/{collect" - + "ion_id}Z?\022=/v1/{parent=projects/*/databa" - + "ses/*/documents}/{collection_id}\022\277\001\n\016Upd" - + "ateDocument\022*.google.firestore.v1.Update" - + "DocumentRequest\032\035.google.firestore.v1.Do" - + "cument\"b\332A\024document,update_mask\202\323\344\223\002E29/" - + "v1/{document.name=projects/*/databases/*" - + "/documents/*/**}:\010document\022\225\001\n\016DeleteDoc" - + "ument\022*.google.firestore.v1.DeleteDocume" - + "ntRequest\032\026.google.protobuf.Empty\"?\332A\004na" - + "me\202\323\344\223\0022*0/v1/{name=projects/*/databases" - + "/*/documents/*/**}\022\271\001\n\021BatchGetDocuments" - + "\022-.google.firestore.v1.BatchGetDocuments" - + "Request\032..google.firestore.v1.BatchGetDo" - + "cumentsResponse\"C\202\323\344\223\002=\"8/v1/{database=p" - + "rojects/*/databases/*}/documents:batchGe" - + "t:\001*0\001\022\307\001\n\020BeginTransaction\022,.google.fir" - + "estore.v1.BeginTransactionRequest\032-.goog" - + "le.firestore.v1.BeginTransactionResponse" - + "\"V\332A\010database\202\323\344\223\002E\"@/v1/{database=proje" - + "cts/*/databases/*}/documents:beginTransa" - + "ction:\001*\022\246\001\n\006Commit\022\".google.firestore.v" - + "1.CommitRequest\032#.google.firestore.v1.Co" - + "mmitResponse\"S\332A\017database,writes\202\323\344\223\002;\"6" - + "/v1/{database=projects/*/databases/*}/do" - + "cuments:commit:\001*\022\244\001\n\010Rollback\022$.google." - + "firestore.v1.RollbackRequest\032\026.google.pr" - + "otobuf.Empty\"Z\332A\024database,transaction\202\323\344" - + "\223\002=\"8/v1/{database=projects/*/databases/" - + "*}/documents:rollback:\001*\022\337\001\n\010RunQuery\022$." - + "google.firestore.v1.RunQueryRequest\032%.go" - + "ogle.firestore.v1.RunQueryResponse\"\203\001\202\323\344" - + "\223\002}\"6/v1/{parent=projects/*/databases/*/" - + "documents}:runQuery:\001*Z@\";/v1/{parent=pr" - + "ojects/*/databases/*/documents/*/**}:run" - + "Query:\001*0\001\022\227\002\n\023RunAggregationQuery\022/.goo" - + "gle.firestore.v1.RunAggregationQueryRequ" - + "est\0320.google.firestore.v1.RunAggregation" - + "QueryResponse\"\232\001\202\323\344\223\002\223\001\"A/v1/{parent=pro" - + "jects/*/databases/*/documents}:runAggreg" - + "ationQuery:\001*ZK\"F/v1/{parent=projects/*/" - + "databases/*/documents/*/**}:runAggregati" - + "onQuery:\001*0\001\022\374\001\n\016PartitionQuery\022*.google" - + ".firestore.v1.PartitionQueryRequest\032+.go" - + "ogle.firestore.v1.PartitionQueryResponse" - + "\"\220\001\202\323\344\223\002\211\001\"\n\006labe" + + "ls\030\004 \003(\0132..google.firestore.v1.ListenReq" + + "uest.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarget_change" + + "\"\325\002\n\016ListenResponse\022:\n\rtarget_change\030\002 \001" + + "(\0132!.google.firestore.v1.TargetChangeH\000\022" + + ">\n\017document_change\030\003 \001(\0132#.google.firest" + + "ore.v1.DocumentChangeH\000\022>\n\017document_dele" + + "te\030\004 \001(\0132#.google.firestore.v1.DocumentD" + + "eleteH\000\022>\n\017document_remove\030\006 \001(\0132#.googl" + + "e.firestore.v1.DocumentRemoveH\000\0226\n\006filte" + + "r\030\005 \001(\0132$.google.firestore.v1.ExistenceF" + + "ilterH\000B\017\n\rresponse_type\"\326\003\n\006Target\0228\n\005q" + + "uery\030\002 \001(\0132\'.google.firestore.v1.Target." + + "QueryTargetH\000\022@\n\tdocuments\030\003 \001(\0132+.googl" + + "e.firestore.v1.Target.DocumentsTargetH\000\022" + + "\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001" + + "(\0132\032.google.protobuf.TimestampH\001\022\021\n\ttarg" + + "et_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\0223\n\016expected_co" + + "unt\030\014 \001(\0132\033.google.protobuf.Int32Value\032$" + + "\n\017DocumentsTarget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013" + + "QueryTarget\022\016\n\006parent\030\001 \001(\t\022@\n\020structure" + + "d_query\030\002 \001(\0132$.google.firestore.v1.Stru" + + "cturedQueryH\000B\014\n\nquery_typeB\r\n\013target_ty" + + "peB\r\n\013resume_type\"\252\002\n\014TargetChange\022N\n\022ta" + + "rget_change_type\030\001 \001(\01622.google.firestor" + + "e.v1.TargetChange.TargetChangeType\022\022\n\nta" + + "rget_ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.r" + + "pc.Status\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_" + + "time\030\006 \001(\0132\032.google.protobuf.Timestamp\"N" + + "\n\020TargetChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD" + + "\020\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"\237" + + "\001\n\030ListCollectionIdsRequest\022\023\n\006parent\030\001 " + + "\001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" + + "n\030\003 \001(\t\022/\n\tread_time\030\004 \001(\0132\032.google.prot" + + "obuf.TimestampH\000B\026\n\024consistency_selector" + + "\"L\n\031ListCollectionIdsResponse\022\026\n\016collect" + + "ion_ids\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t\"\311" + + "\001\n\021BatchWriteRequest\022\025\n\010database\030\001 \001(\tB\003" + + "\340A\002\022*\n\006writes\030\002 \003(\0132\032.google.firestore.v" + + "1.Write\022B\n\006labels\030\003 \003(\01322.google.firesto" + + "re.v1.BatchWriteRequest.LabelsEntry\032-\n\013L" + + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"q\n\022BatchWriteResponse\0227\n\rwrite_result" + + "s\030\001 \003(\0132 .google.firestore.v1.WriteResul" + + "t\022\"\n\006status\030\002 \003(\0132\022.google.rpc.Status2\373\033" + + "\n\tFirestore\022\217\001\n\013GetDocument\022\'.google.fir" + + "estore.v1.GetDocumentRequest\032\035.google.fi" + + "restore.v1.Document\"8\202\323\344\223\0022\0220/v1/{name=p" + + "rojects/*/databases/*/documents/*/**}\022\365\001" + + "\n\rListDocuments\022).google.firestore.v1.Li" + + "stDocumentsRequest\032*.google.firestore.v1" + + ".ListDocumentsResponse\"\214\001\202\323\344\223\002\205\001\022B/v1/{p" + + "arent=projects/*/databases/*/documents/*" + + "/**}/{collection_id}Z?\022=/v1/{parent=proj" + + "ects/*/databases/*/documents}/{collectio" + + "n_id}\022\277\001\n\016UpdateDocument\022*.google.firest" + + "ore.v1.UpdateDocumentRequest\032\035.google.fi" + + "restore.v1.Document\"b\332A\024document,update_" + + "mask\202\323\344\223\002E29/v1/{document.name=projects/" + + "*/databases/*/documents/*/**}:\010document\022" + + "\225\001\n\016DeleteDocument\022*.google.firestore.v1" + + ".DeleteDocumentRequest\032\026.google.protobuf" + + ".Empty\"?\332A\004name\202\323\344\223\0022*0/v1/{name=project" + + "s/*/databases/*/documents/*/**}\022\271\001\n\021Batc" + + "hGetDocuments\022-.google.firestore.v1.Batc" + + "hGetDocumentsRequest\032..google.firestore." + + "v1.BatchGetDocumentsResponse\"C\202\323\344\223\002=\"8/v" + "1/{database=projects/*/databases/*}/docu" - + "ments:batchWrite:\001*\022\257\001\n\016CreateDocument\022*" - + ".google.firestore.v1.CreateDocumentReque" - + "st\032\035.google.firestore.v1.Document\"R\202\323\344\223\002" - + "L\"@/v1/{parent=projects/*/databases/*/do" - + "cuments/**}/{collection_id}:\010document\032v\312" - + "A\030firestore.googleapis.com\322AXhttps://www" - + ".googleapis.com/auth/cloud-platform,http" - + "s://www.googleapis.com/auth/datastoreB\277\001" - + "\n\027com.google.firestore.v1B\016FirestoreProt" - + "oP\001Z;cloud.google.com/go/firestore/apiv1" - + "/firestorepb;firestorepb\252\002\031Google.Cloud." - + "Firestore.V1\312\002\031Google\\Cloud\\Firestore\\V1" - + "\352\002\034Google::Cloud::Firestore::V1b\006proto3" + + "ments:batchGet:\001*0\001\022\307\001\n\020BeginTransaction" + + "\022,.google.firestore.v1.BeginTransactionR" + + "equest\032-.google.firestore.v1.BeginTransa" + + "ctionResponse\"V\332A\010database\202\323\344\223\002E\"@/v1/{d" + + "atabase=projects/*/databases/*}/document" + + "s:beginTransaction:\001*\022\246\001\n\006Commit\022\".googl" + + "e.firestore.v1.CommitRequest\032#.google.fi" + + "restore.v1.CommitResponse\"S\332A\017database,w" + + "rites\202\323\344\223\002;\"6/v1/{database=projects/*/da" + + "tabases/*}/documents:commit:\001*\022\244\001\n\010Rollb" + + "ack\022$.google.firestore.v1.RollbackReques" + + "t\032\026.google.protobuf.Empty\"Z\332A\024database,t" + + "ransaction\202\323\344\223\002=\"8/v1/{database=projects" + + "/*/databases/*}/documents:rollback:\001*\022\337\001" + + "\n\010RunQuery\022$.google.firestore.v1.RunQuer" + + "yRequest\032%.google.firestore.v1.RunQueryR" + + "esponse\"\203\001\202\323\344\223\002}\"6/v1/{parent=projects/*" + + "/databases/*/documents}:runQuery:\001*Z@\";/" + + "v1/{parent=projects/*/databases/*/docume" + + "nts/*/**}:runQuery:\001*0\001\022\236\002\n\017ExecutePipel" + + "ine\022+.google.firestore.v1.ExecutePipelin" + + "eRequest\032,.google.firestore.v1.ExecutePi" + + "pelineResponse\"\255\001\202\323\344\223\002D\"?/v1/{database=p" + + "rojects/*/databases/*}/documents:execute" + + "Pipeline:\001*\212\323\344\223\002]\022&\n\010database\022\032projects/" + + "{project_id=*}/**\0223\n\010database\022\'projects/" + + "*/databases/{database_id=*}/**0\001\022\227\002\n\023Run" + + "AggregationQuery\022/.google.firestore.v1.R" + + "unAggregationQueryRequest\0320.google.fires" + + "tore.v1.RunAggregationQueryResponse\"\232\001\202\323" + + "\344\223\002\223\001\"A/v1/{parent=projects/*/databases/" + + "*/documents}:runAggregationQuery:\001*ZK\"F/" + + "v1/{parent=projects/*/databases/*/docume" + + "nts/*/**}:runAggregationQuery:\001*0\001\022\374\001\n\016P" + + "artitionQuery\022*.google.firestore.v1.Part" + + "itionQueryRequest\032+.google.firestore.v1." + + "PartitionQueryResponse\"\220\001\202\323\344\223\002\211\001\" + * Represents an unevaluated scalar expression. + * + * For example, the expression `like(user_name, "%alice%")` is represented as: + * + * ``` + * name: "like" + * args { field_reference: "user_name" } + * args { string_value: "%alice%" } + * ``` + * + * + * Protobuf type {@code google.firestore.v1.Function} + */ +public final class Function extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.Function) + FunctionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Function.newBuilder() to construct. + private Function(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Function() { + name_ = ""; + args_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Function(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Function_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Function_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.Function.class, com.google.firestore.v1.Function.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the function to evaluate.
+   *
+   * **Requires:**
+   *
+   * * must be in snake case (lower case with underscore separator).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the function to evaluate.
+   *
+   * **Requires:**
+   *
+   * * must be in snake case (lower case with underscore separator).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List args_; + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getArgsList() { + return args_; + } + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getArgsOrBuilderList() { + return args_; + } + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getArgsCount() { + return args_.size(); + } + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getArgs(int index) { + return args_.get(index); + } + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.ValueOrBuilder getArgsOrBuilder(int index) { + return args_.get(index); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + + private static final class OptionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Function_OptionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.firestore.v1.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField options_; + + private com.google.protobuf.MapField + internalGetOptions() { + if (options_ == null) { + return com.google.protobuf.MapField.emptyMapField(OptionsDefaultEntryHolder.defaultEntry); + } + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().getMap().size(); + } + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOptions().getMap().containsKey(key); + } + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getMap(); + } + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < args_.size(); i++) { + output.writeMessage(2, args_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetOptions(), OptionsDefaultEntryHolder.defaultEntry, 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < args_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, args_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetOptions().getMap().entrySet()) { + com.google.protobuf.MapEntry options__ = + OptionsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, options__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.Function)) { + return super.equals(obj); + } + com.google.firestore.v1.Function other = (com.google.firestore.v1.Function) obj; + + if (!getName().equals(other.getName())) return false; + if (!getArgsList().equals(other.getArgsList())) return false; + if (!internalGetOptions().equals(other.internalGetOptions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + if (!internalGetOptions().getMap().isEmpty()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.Function parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Function parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Function parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Function parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Function parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Function parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Function parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Function parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.Function parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Function parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.Function parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Function parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.Function prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents an unevaluated scalar expression.
+   *
+   * For example, the expression `like(user_name, "%alice%")` is represented as:
+   *
+   * ```
+   * name: "like"
+   * args { field_reference: "user_name" }
+   * args { string_value: "%alice%" }
+   * ```
+   * 
+ * + * Protobuf type {@code google.firestore.v1.Function} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.Function) + com.google.firestore.v1.FunctionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Function_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Function_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.Function.class, + com.google.firestore.v1.Function.Builder.class); + } + + // Construct using com.google.firestore.v1.Function.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (argsBuilder_ == null) { + args_ = java.util.Collections.emptyList(); + } else { + args_ = null; + argsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableOptions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Function_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.Function getDefaultInstanceForType() { + return com.google.firestore.v1.Function.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.Function build() { + com.google.firestore.v1.Function result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.Function buildPartial() { + com.google.firestore.v1.Function result = new com.google.firestore.v1.Function(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.firestore.v1.Function result) { + if (argsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + args_ = java.util.Collections.unmodifiableList(args_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.args_ = args_; + } else { + result.args_ = argsBuilder_.build(); + } + } + + private void buildPartial0(com.google.firestore.v1.Function result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.options_ = internalGetOptions().build(OptionsDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.Function) { + return mergeFrom((com.google.firestore.v1.Function) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.Function other) { + if (other == com.google.firestore.v1.Function.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (argsBuilder_ == null) { + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + } else { + if (!other.args_.isEmpty()) { + if (argsBuilder_.isEmpty()) { + argsBuilder_.dispose(); + argsBuilder_ = null; + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + argsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getArgsFieldBuilder() + : null; + } else { + argsBuilder_.addAllMessages(other.args_); + } + } + } + internalGetMutableOptions().mergeFrom(other.internalGetOptions()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.firestore.v1.Value m = + input.readMessage(com.google.firestore.v1.Value.parser(), extensionRegistry); + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.add(m); + } else { + argsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry + options__ = + input.readMessage( + OptionsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableOptions() + .ensureBuilderMap() + .put(options__.getKey(), options__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the function to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the function to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the function to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the function to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the function to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List args_ = java.util.Collections.emptyList(); + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + args_ = new java.util.ArrayList(args_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder, + com.google.firestore.v1.ValueOrBuilder> + argsBuilder_; + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getArgsList() { + if (argsBuilder_ == null) { + return java.util.Collections.unmodifiableList(args_); + } else { + return argsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getArgsCount() { + if (argsBuilder_ == null) { + return args_.size(); + } else { + return argsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value getArgs(int index) { + if (argsBuilder_ == null) { + return args_.get(index); + } else { + return argsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setArgs(int index, com.google.firestore.v1.Value value) { + if (argsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + } else { + argsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setArgs(int index, com.google.firestore.v1.Value.Builder builderForValue) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.set(index, builderForValue.build()); + onChanged(); + } else { + argsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(com.google.firestore.v1.Value value) { + if (argsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + } else { + argsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(int index, com.google.firestore.v1.Value value) { + if (argsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(index, value); + onChanged(); + } else { + argsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(com.google.firestore.v1.Value.Builder builderForValue) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.add(builderForValue.build()); + onChanged(); + } else { + argsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(int index, com.google.firestore.v1.Value.Builder builderForValue) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.add(index, builderForValue.build()); + onChanged(); + } else { + argsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllArgs(java.lang.Iterable values) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + } else { + argsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearArgs() { + if (argsBuilder_ == null) { + args_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + argsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeArgs(int index) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.remove(index); + onChanged(); + } else { + argsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder getArgsBuilder(int index) { + return getArgsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.ValueOrBuilder getArgsOrBuilder(int index) { + if (argsBuilder_ == null) { + return args_.get(index); + } else { + return argsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getArgsOrBuilderList() { + if (argsBuilder_ != null) { + return argsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(args_); + } + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder addArgsBuilder() { + return getArgsFieldBuilder().addBuilder(com.google.firestore.v1.Value.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder addArgsBuilder(int index) { + return getArgsFieldBuilder() + .addBuilder(index, com.google.firestore.v1.Value.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given function expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getArgsBuilderList() { + return getArgsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder, + com.google.firestore.v1.ValueOrBuilder> + getArgsFieldBuilder() { + if (argsBuilder_ == null) { + argsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder, + com.google.firestore.v1.ValueOrBuilder>( + args_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + args_ = null; + } + return argsBuilder_; + } + + private static final class OptionsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value> { + @java.lang.Override + public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilder val) { + if (val instanceof com.google.firestore.v1.Value) { + return (com.google.firestore.v1.Value) val; + } + return ((com.google.firestore.v1.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return OptionsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final OptionsConverter optionsConverter = new OptionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + options_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + internalGetOptions() { + if (options_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(optionsConverter); + } + return options_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + internalGetMutableOptions() { + if (options_ == null) { + options_ = new com.google.protobuf.MapFieldBuilder<>(optionsConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOptions().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getImmutableMap(); + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableOptions().ensureBuilderMap(); + return map.containsKey(key) ? optionsConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableOptions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return optionsConverter.build(map.get(key)); + } + + public Builder clearOptions() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableOptions().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableOptions().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableOptions() { + bitField0_ |= 0x00000004; + return internalGetMutableOptions().ensureMessageMap(); + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putOptions(java.lang.String key, com.google.firestore.v1.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableOptions().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllOptions( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableOptions().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder putOptionsBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableOptions().ensureBuilderMap(); + com.google.firestore.v1.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.firestore.v1.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.firestore.v1.Value) { + entry = ((com.google.firestore.v1.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.firestore.v1.Value.Builder) entry; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.Function) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.Function) + private static final com.google.firestore.v1.Function DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.Function(); + } + + public static com.google.firestore.v1.Function getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Function parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.Function getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FunctionOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FunctionOrBuilder.java new file mode 100644 index 000000000..f89cd92e2 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FunctionOrBuilder.java @@ -0,0 +1,193 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/document.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public interface FunctionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.Function) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the function to evaluate.
+   *
+   * **Requires:**
+   *
+   * * must be in snake case (lower case with underscore separator).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the function to evaluate.
+   *
+   * **Requires:**
+   *
+   * * must be in snake case (lower case with underscore separator).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getArgsList(); + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.v1.Value getArgs(int index); + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getArgsCount(); + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getArgsOrBuilderList(); + + /** + * + * + *
+   * Optional. Ordered list of arguments the given function expects.
+   * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.v1.ValueOrBuilder getArgsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getOptionsCount(); + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsOptions(java.lang.String key); + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOptions(); + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getOptionsMap(); + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue); + + /** + * + * + *
+   * Optional. Optional named arguments that certain functions may support.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java index ccd1af58d..465d7fd24 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class GetDocumentRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.GetDocumentRequest) GetDocumentRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetDocumentRequest.newBuilder() to construct. private GetDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -82,6 +83,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -118,6 +120,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -142,6 +145,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -169,6 +173,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int MASK_FIELD_NUMBER = 2; private com.google.firestore.v1.DocumentMask mask_; + /** * * @@ -187,6 +192,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasMask() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -205,6 +211,7 @@ public boolean hasMask() { public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } + /** * * @@ -223,6 +230,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { } public static final int TRANSACTION_FIELD_NUMBER = 3; + /** * * @@ -238,6 +246,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasTransaction() { return consistencySelectorCase_ == 3; } + /** * * @@ -258,6 +267,7 @@ public com.google.protobuf.ByteString getTransaction() { } public static final int READ_TIME_FIELD_NUMBER = 5; + /** * * @@ -277,6 +287,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasReadTime() { return consistencySelectorCase_ == 5; } + /** * * @@ -299,6 +310,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -532,6 +544,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -801,6 +814,7 @@ public Builder clearConsistencySelector() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -824,6 +838,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -847,6 +862,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -869,6 +885,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -887,6 +904,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -917,6 +935,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.DocumentMask.Builder, com.google.firestore.v1.DocumentMaskOrBuilder> maskBuilder_; + /** * * @@ -934,6 +953,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -955,6 +975,7 @@ public com.google.firestore.v1.DocumentMask getMask() { return maskBuilder_.getMessage(); } } + /** * * @@ -980,6 +1001,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask value) { onChanged(); return this; } + /** * * @@ -1002,6 +1024,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask.Builder builderForVa onChanged(); return this; } + /** * * @@ -1032,6 +1055,7 @@ public Builder mergeMask(com.google.firestore.v1.DocumentMask value) { } return this; } + /** * * @@ -1054,6 +1078,7 @@ public Builder clearMask() { onChanged(); return this; } + /** * * @@ -1071,6 +1096,7 @@ public com.google.firestore.v1.DocumentMask.Builder getMaskBuilder() { onChanged(); return getMaskFieldBuilder().getBuilder(); } + /** * * @@ -1090,6 +1116,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } } + /** * * @@ -1133,6 +1160,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasTransaction() { return consistencySelectorCase_ == 3; } + /** * * @@ -1150,6 +1178,7 @@ public com.google.protobuf.ByteString getTransaction() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1171,6 +1200,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1196,6 +1226,7 @@ public Builder clearTransaction() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1215,6 +1246,7 @@ public Builder clearTransaction() { public boolean hasReadTime() { return consistencySelectorCase_ == 5; } + /** * * @@ -1244,6 +1276,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1270,6 +1303,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 5; return this; } + /** * * @@ -1293,6 +1327,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 5; return this; } + /** * * @@ -1329,6 +1364,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 5; return this; } + /** * * @@ -1358,6 +1394,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -1374,6 +1411,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1398,6 +1436,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java index 58ee5aee8..ba0e71041 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface GetDocumentRequestOrBuilder @@ -37,6 +37,7 @@ public interface GetDocumentRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -66,6 +67,7 @@ public interface GetDocumentRequestOrBuilder * @return Whether the mask field is set. */ boolean hasMask(); + /** * * @@ -81,6 +83,7 @@ public interface GetDocumentRequestOrBuilder * @return The mask. */ com.google.firestore.v1.DocumentMask getMask(); + /** * * @@ -107,6 +110,7 @@ public interface GetDocumentRequestOrBuilder * @return Whether the transaction field is set. */ boolean hasTransaction(); + /** * * @@ -136,6 +140,7 @@ public interface GetDocumentRequestOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -152,6 +157,7 @@ public interface GetDocumentRequestOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java index 2d0772a2c..7e543c9c0 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class ListCollectionIdsRequest extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.firestore.v1.ListCollectionIdsRequest) ListCollectionIdsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListCollectionIdsRequest.newBuilder() to construct. private ListCollectionIdsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -115,6 +117,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -141,6 +144,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -170,6 +174,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -190,6 +195,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -214,6 +220,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -240,6 +247,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } public static final int READ_TIME_FIELD_NUMBER = 4; + /** * * @@ -259,6 +267,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public boolean hasReadTime() { return consistencySelectorCase_ == 4; } + /** * * @@ -281,6 +290,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -503,6 +513,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -761,6 +772,7 @@ public Builder clearConsistencySelector() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -786,6 +798,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -811,6 +824,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -835,6 +849,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -855,6 +870,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -882,6 +898,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -897,6 +914,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -916,6 +934,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -935,6 +954,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -958,6 +978,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -981,6 +1002,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1003,6 +1025,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1021,6 +1044,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1050,6 +1074,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1069,6 +1094,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { public boolean hasReadTime() { return consistencySelectorCase_ == 4; } + /** * * @@ -1098,6 +1124,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1124,6 +1151,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 4; return this; } + /** * * @@ -1147,6 +1175,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 4; return this; } + /** * * @@ -1183,6 +1212,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 4; return this; } + /** * * @@ -1212,6 +1242,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -1228,6 +1259,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1252,6 +1284,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequestOrBuilder.java index 2599ee7b2..040bc63e0 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ListCollectionIdsRequestOrBuilder @@ -39,6 +39,7 @@ public interface ListCollectionIdsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -81,6 +82,7 @@ public interface ListCollectionIdsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * @@ -111,6 +113,7 @@ public interface ListCollectionIdsRequestOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -127,6 +130,7 @@ public interface ListCollectionIdsRequestOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java index b12e71b38..c5ad75f99 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class ListCollectionIdsResponse extends com.google.protobuf.Generat // @@protoc_insertion_point(message_implements:google.firestore.v1.ListCollectionIdsResponse) ListCollectionIdsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListCollectionIdsResponse.newBuilder() to construct. private ListCollectionIdsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -84,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getCollectionIdsList() { return collectionIds_; } + /** * * @@ -98,6 +101,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * @@ -113,6 +117,7 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * @@ -133,6 +138,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -156,6 +162,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -355,6 +362,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -570,6 +578,7 @@ private void ensureCollectionIdsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -585,6 +594,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { collectionIds_.makeImmutable(); return collectionIds_; } + /** * * @@ -599,6 +609,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { public int getCollectionIdsCount() { return collectionIds_.size(); } + /** * * @@ -614,6 +625,7 @@ public int getCollectionIdsCount() { public java.lang.String getCollectionIds(int index) { return collectionIds_.get(index); } + /** * * @@ -629,6 +641,7 @@ public java.lang.String getCollectionIds(int index) { public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { return collectionIds_.getByteString(index); } + /** * * @@ -652,6 +665,7 @@ public Builder setCollectionIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -674,6 +688,7 @@ public Builder addCollectionIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -693,6 +708,7 @@ public Builder addAllCollectionIds(java.lang.Iterable values) onChanged(); return this; } + /** * * @@ -711,6 +727,7 @@ public Builder clearCollectionIds() { onChanged(); return this; } + /** * * @@ -736,6 +753,7 @@ public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -758,6 +776,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -780,6 +799,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -801,6 +821,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -818,6 +839,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponseOrBuilder.java index 9ad3ff5a9..324dc36b8 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ListCollectionIdsResponseOrBuilder @@ -36,6 +36,7 @@ public interface ListCollectionIdsResponseOrBuilder * @return A list containing the collectionIds. */ java.util.List getCollectionIdsList(); + /** * * @@ -48,6 +49,7 @@ public interface ListCollectionIdsResponseOrBuilder * @return The count of collectionIds. */ int getCollectionIdsCount(); + /** * * @@ -61,6 +63,7 @@ public interface ListCollectionIdsResponseOrBuilder * @return The collectionIds at the given index. */ java.lang.String getCollectionIds(int index); + /** * * @@ -87,6 +90,7 @@ public interface ListCollectionIdsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java index ae4e9dcf2..68cd331bf 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class ListDocumentsRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.firestore.v1.ListDocumentsRequest) ListDocumentsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListDocumentsRequest.newBuilder() to construct. private ListDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -85,6 +86,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -121,6 +123,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -150,6 +153,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -184,6 +188,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object collectionId_ = ""; + /** * * @@ -212,6 +217,7 @@ public java.lang.String getCollectionId() { return s; } } + /** * * @@ -243,6 +249,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 3; private int pageSize_ = 0; + /** * * @@ -265,6 +272,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -292,6 +300,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -324,6 +333,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { @SuppressWarnings("serial") private volatile java.lang.Object orderBy_ = ""; + /** * * @@ -353,6 +363,7 @@ public java.lang.String getOrderBy() { return s; } } + /** * * @@ -385,6 +396,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { public static final int MASK_FIELD_NUMBER = 7; private com.google.firestore.v1.DocumentMask mask_; + /** * * @@ -404,6 +416,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { public boolean hasMask() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -423,6 +436,7 @@ public boolean hasMask() { public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } + /** * * @@ -442,6 +456,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { } public static final int TRANSACTION_FIELD_NUMBER = 8; + /** * * @@ -457,6 +472,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasTransaction() { return consistencySelectorCase_ == 8; } + /** * * @@ -477,6 +493,7 @@ public com.google.protobuf.ByteString getTransaction() { } public static final int READ_TIME_FIELD_NUMBER = 10; + /** * * @@ -496,6 +513,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasReadTime() { return consistencySelectorCase_ == 10; } + /** * * @@ -518,6 +536,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -541,6 +560,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public static final int SHOW_MISSING_FIELD_NUMBER = 12; private boolean showMissing_ = false; + /** * * @@ -822,6 +842,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1162,6 +1183,7 @@ public Builder clearConsistencySelector() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -1190,6 +1212,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -1218,6 +1241,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1245,6 +1269,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1268,6 +1293,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -1298,6 +1324,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object collectionId_ = ""; + /** * * @@ -1325,6 +1352,7 @@ public java.lang.String getCollectionId() { return (java.lang.String) ref; } } + /** * * @@ -1352,6 +1380,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1378,6 +1407,7 @@ public Builder setCollectionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1400,6 +1430,7 @@ public Builder clearCollectionId() { onChanged(); return this; } + /** * * @@ -1429,6 +1460,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -1446,6 +1478,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -1467,6 +1500,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -1488,6 +1522,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -1514,6 +1549,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1540,6 +1576,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1565,6 +1602,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1586,6 +1624,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1614,6 +1653,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { } private java.lang.Object orderBy_ = ""; + /** * * @@ -1642,6 +1682,7 @@ public java.lang.String getOrderBy() { return (java.lang.String) ref; } } + /** * * @@ -1670,6 +1711,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1697,6 +1739,7 @@ public Builder setOrderBy(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1720,6 +1763,7 @@ public Builder clearOrderBy() { onChanged(); return this; } + /** * * @@ -1755,6 +1799,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.DocumentMask.Builder, com.google.firestore.v1.DocumentMaskOrBuilder> maskBuilder_; + /** * * @@ -1773,6 +1818,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { public boolean hasMask() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -1795,6 +1841,7 @@ public com.google.firestore.v1.DocumentMask getMask() { return maskBuilder_.getMessage(); } } + /** * * @@ -1821,6 +1868,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask value) { onChanged(); return this; } + /** * * @@ -1844,6 +1892,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask.Builder builderForVa onChanged(); return this; } + /** * * @@ -1875,6 +1924,7 @@ public Builder mergeMask(com.google.firestore.v1.DocumentMask value) { } return this; } + /** * * @@ -1898,6 +1948,7 @@ public Builder clearMask() { onChanged(); return this; } + /** * * @@ -1916,6 +1967,7 @@ public com.google.firestore.v1.DocumentMask.Builder getMaskBuilder() { onChanged(); return getMaskFieldBuilder().getBuilder(); } + /** * * @@ -1936,6 +1988,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } } + /** * * @@ -1980,6 +2033,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasTransaction() { return consistencySelectorCase_ == 8; } + /** * * @@ -1997,6 +2051,7 @@ public com.google.protobuf.ByteString getTransaction() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -2018,6 +2073,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2043,6 +2099,7 @@ public Builder clearTransaction() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -2062,6 +2119,7 @@ public Builder clearTransaction() { public boolean hasReadTime() { return consistencySelectorCase_ == 10; } + /** * * @@ -2091,6 +2149,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -2117,6 +2176,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 10; return this; } + /** * * @@ -2140,6 +2200,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 10; return this; } + /** * * @@ -2176,6 +2237,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 10; return this; } + /** * * @@ -2205,6 +2267,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -2221,6 +2284,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -2245,6 +2309,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -2283,6 +2348,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { } private boolean showMissing_; + /** * * @@ -2306,6 +2372,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean getShowMissing() { return showMissing_; } + /** * * @@ -2333,6 +2400,7 @@ public Builder setShowMissing(boolean value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java index 9d7f5055e..82b88216a 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ListDocumentsRequestOrBuilder @@ -42,6 +42,7 @@ public interface ListDocumentsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -78,6 +79,7 @@ public interface ListDocumentsRequestOrBuilder * @return The collectionId. */ java.lang.String getCollectionId(); + /** * * @@ -127,6 +129,7 @@ public interface ListDocumentsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * @@ -162,6 +165,7 @@ public interface ListDocumentsRequestOrBuilder * @return The orderBy. */ java.lang.String getOrderBy(); + /** * * @@ -197,6 +201,7 @@ public interface ListDocumentsRequestOrBuilder * @return Whether the mask field is set. */ boolean hasMask(); + /** * * @@ -213,6 +218,7 @@ public interface ListDocumentsRequestOrBuilder * @return The mask. */ com.google.firestore.v1.DocumentMask getMask(); + /** * * @@ -240,6 +246,7 @@ public interface ListDocumentsRequestOrBuilder * @return Whether the transaction field is set. */ boolean hasTransaction(); + /** * * @@ -269,6 +276,7 @@ public interface ListDocumentsRequestOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -285,6 +293,7 @@ public interface ListDocumentsRequestOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java index 85be21fb9..a4590a0de 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class ListDocumentsResponse extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.v1.ListDocumentsResponse) ListDocumentsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListDocumentsResponse.newBuilder() to construct. private ListDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List documents_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getDocumentsList() { return documents_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getDocumentsList() { getDocumentsOrBuilderList() { return documents_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getDocumentsList() { public int getDocumentsCount() { return documents_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getDocumentsCount() { public com.google.firestore.v1.Document getDocuments(int index) { return documents_.get(index); } + /** * * @@ -140,6 +146,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentsOrBuilder(int index @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -165,6 +172,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -361,6 +369,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -635,6 +644,7 @@ public java.util.List getDocumentsList() { return documentsBuilder_.getMessageList(); } } + /** * * @@ -651,6 +661,7 @@ public int getDocumentsCount() { return documentsBuilder_.getCount(); } } + /** * * @@ -667,6 +678,7 @@ public com.google.firestore.v1.Document getDocuments(int index) { return documentsBuilder_.getMessage(index); } } + /** * * @@ -689,6 +701,7 @@ public Builder setDocuments(int index, com.google.firestore.v1.Document value) { } return this; } + /** * * @@ -709,6 +722,7 @@ public Builder setDocuments( } return this; } + /** * * @@ -731,6 +745,7 @@ public Builder addDocuments(com.google.firestore.v1.Document value) { } return this; } + /** * * @@ -753,6 +768,7 @@ public Builder addDocuments(int index, com.google.firestore.v1.Document value) { } return this; } + /** * * @@ -772,6 +788,7 @@ public Builder addDocuments(com.google.firestore.v1.Document.Builder builderForV } return this; } + /** * * @@ -792,6 +809,7 @@ public Builder addDocuments( } return this; } + /** * * @@ -812,6 +830,7 @@ public Builder addAllDocuments( } return this; } + /** * * @@ -831,6 +850,7 @@ public Builder clearDocuments() { } return this; } + /** * * @@ -850,6 +870,7 @@ public Builder removeDocuments(int index) { } return this; } + /** * * @@ -862,6 +883,7 @@ public Builder removeDocuments(int index) { public com.google.firestore.v1.Document.Builder getDocumentsBuilder(int index) { return getDocumentsFieldBuilder().getBuilder(index); } + /** * * @@ -878,6 +900,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentsOrBuilder(int index return documentsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -895,6 +918,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentsOrBuilder(int index return java.util.Collections.unmodifiableList(documents_); } } + /** * * @@ -908,6 +932,7 @@ public com.google.firestore.v1.Document.Builder addDocumentsBuilder() { return getDocumentsFieldBuilder() .addBuilder(com.google.firestore.v1.Document.getDefaultInstance()); } + /** * * @@ -921,6 +946,7 @@ public com.google.firestore.v1.Document.Builder addDocumentsBuilder(int index) { return getDocumentsFieldBuilder() .addBuilder(index, com.google.firestore.v1.Document.getDefaultInstance()); } + /** * * @@ -952,6 +978,7 @@ public java.util.List getDocumentsBuil } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -976,6 +1003,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1000,6 +1028,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1023,6 +1052,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1042,6 +1072,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponseOrBuilder.java index 3ac93b9d6..8e2bddf12 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ListDocumentsResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListDocumentsResponseOrBuilder * repeated .google.firestore.v1.Document documents = 1; */ java.util.List getDocumentsList(); + /** * * @@ -44,6 +45,7 @@ public interface ListDocumentsResponseOrBuilder * repeated .google.firestore.v1.Document documents = 1; */ com.google.firestore.v1.Document getDocuments(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListDocumentsResponseOrBuilder * repeated .google.firestore.v1.Document documents = 1; */ int getDocumentsCount(); + /** * * @@ -64,6 +67,7 @@ public interface ListDocumentsResponseOrBuilder * repeated .google.firestore.v1.Document documents = 1; */ java.util.List getDocumentsOrBuilderList(); + /** * * @@ -89,6 +93,7 @@ public interface ListDocumentsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java index 35ab46c39..32c3de415 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class ListenRequest extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.ListenRequest) ListenRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListenRequest.newBuilder() to construct. private ListenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -92,6 +93,7 @@ public enum TargetChangeCase private TargetChangeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -128,6 +130,7 @@ public TargetChangeCase getTargetChangeCase() { @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -152,6 +155,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -178,6 +182,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { } public static final int ADD_TARGET_FIELD_NUMBER = 2; + /** * * @@ -193,6 +198,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { public boolean hasAddTarget() { return targetChangeCase_ == 2; } + /** * * @@ -211,6 +217,7 @@ public com.google.firestore.v1.Target getAddTarget() { } return com.google.firestore.v1.Target.getDefaultInstance(); } + /** * * @@ -229,6 +236,7 @@ public com.google.firestore.v1.TargetOrBuilder getAddTargetOrBuilder() { } public static final int REMOVE_TARGET_FIELD_NUMBER = 3; + /** * * @@ -244,6 +252,7 @@ public com.google.firestore.v1.TargetOrBuilder getAddTargetOrBuilder() { public boolean hasRemoveTarget() { return targetChangeCase_ == 3; } + /** * * @@ -289,6 +298,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -305,12 +315,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -324,6 +336,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -344,6 +357,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -578,6 +592,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -858,6 +873,7 @@ public Builder clearTargetChange() { private int bitField0_; private java.lang.Object database_ = ""; + /** * * @@ -881,6 +897,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -904,6 +921,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -926,6 +944,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -944,6 +963,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -973,6 +993,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.Target.Builder, com.google.firestore.v1.TargetOrBuilder> addTargetBuilder_; + /** * * @@ -988,6 +1009,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { public boolean hasAddTarget() { return targetChangeCase_ == 2; } + /** * * @@ -1013,6 +1035,7 @@ public com.google.firestore.v1.Target getAddTarget() { return com.google.firestore.v1.Target.getDefaultInstance(); } } + /** * * @@ -1035,6 +1058,7 @@ public Builder setAddTarget(com.google.firestore.v1.Target value) { targetChangeCase_ = 2; return this; } + /** * * @@ -1054,6 +1078,7 @@ public Builder setAddTarget(com.google.firestore.v1.Target.Builder builderForVal targetChangeCase_ = 2; return this; } + /** * * @@ -1086,6 +1111,7 @@ public Builder mergeAddTarget(com.google.firestore.v1.Target value) { targetChangeCase_ = 2; return this; } + /** * * @@ -1111,6 +1137,7 @@ public Builder clearAddTarget() { } return this; } + /** * * @@ -1123,6 +1150,7 @@ public Builder clearAddTarget() { public com.google.firestore.v1.Target.Builder getAddTargetBuilder() { return getAddTargetFieldBuilder().getBuilder(); } + /** * * @@ -1143,6 +1171,7 @@ public com.google.firestore.v1.TargetOrBuilder getAddTargetOrBuilder() { return com.google.firestore.v1.Target.getDefaultInstance(); } } + /** * * @@ -1188,6 +1217,7 @@ public com.google.firestore.v1.TargetOrBuilder getAddTargetOrBuilder() { public boolean hasRemoveTarget() { return targetChangeCase_ == 3; } + /** * * @@ -1205,6 +1235,7 @@ public int getRemoveTarget() { } return 0; } + /** * * @@ -1224,6 +1255,7 @@ public Builder setRemoveTarget(int value) { onChanged(); return this; } + /** * * @@ -1269,6 +1301,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1285,12 +1318,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -1304,6 +1339,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1324,6 +1360,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1350,6 +1387,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1366,12 +1404,14 @@ public Builder removeLabels(java.lang.String key) { internalGetMutableLabels().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000008; return internalGetMutableLabels().getMutableMap(); } + /** * * @@ -1392,6 +1432,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000008; return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequestOrBuilder.java index 1b1315e1b..619dd9c36 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ListenRequestOrBuilder @@ -37,6 +37,7 @@ public interface ListenRequestOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -63,6 +64,7 @@ public interface ListenRequestOrBuilder * @return Whether the addTarget field is set. */ boolean hasAddTarget(); + /** * * @@ -75,6 +77,7 @@ public interface ListenRequestOrBuilder * @return The addTarget. */ com.google.firestore.v1.Target getAddTarget(); + /** * * @@ -98,6 +101,7 @@ public interface ListenRequestOrBuilder * @return Whether the removeTarget field is set. */ boolean hasRemoveTarget(); + /** * * @@ -121,6 +125,7 @@ public interface ListenRequestOrBuilder * map<string, string> labels = 4; */ int getLabelsCount(); + /** * * @@ -131,9 +136,11 @@ public interface ListenRequestOrBuilder * map<string, string> labels = 4; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -144,6 +151,7 @@ public interface ListenRequestOrBuilder * map<string, string> labels = 4; */ java.util.Map getLabelsMap(); + /** * * @@ -158,6 +166,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java index a96cf176a..4db4efcf7 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class ListenResponse extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.ListenResponse) ListenResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListenResponse.newBuilder() to construct. private ListenResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public enum ResponseTypeCase private ResponseTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -120,6 +122,7 @@ public ResponseTypeCase getResponseTypeCase() { } public static final int TARGET_CHANGE_FIELD_NUMBER = 2; + /** * * @@ -135,6 +138,7 @@ public ResponseTypeCase getResponseTypeCase() { public boolean hasTargetChange() { return responseTypeCase_ == 2; } + /** * * @@ -153,6 +157,7 @@ public com.google.firestore.v1.TargetChange getTargetChange() { } return com.google.firestore.v1.TargetChange.getDefaultInstance(); } + /** * * @@ -171,6 +176,7 @@ public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() } public static final int DOCUMENT_CHANGE_FIELD_NUMBER = 3; + /** * * @@ -186,6 +192,7 @@ public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() public boolean hasDocumentChange() { return responseTypeCase_ == 3; } + /** * * @@ -204,6 +211,7 @@ public com.google.firestore.v1.DocumentChange getDocumentChange() { } return com.google.firestore.v1.DocumentChange.getDefaultInstance(); } + /** * * @@ -222,6 +230,7 @@ public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilde } public static final int DOCUMENT_DELETE_FIELD_NUMBER = 4; + /** * * @@ -237,6 +246,7 @@ public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilde public boolean hasDocumentDelete() { return responseTypeCase_ == 4; } + /** * * @@ -255,6 +265,7 @@ public com.google.firestore.v1.DocumentDelete getDocumentDelete() { } return com.google.firestore.v1.DocumentDelete.getDefaultInstance(); } + /** * * @@ -273,6 +284,7 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde } public static final int DOCUMENT_REMOVE_FIELD_NUMBER = 6; + /** * * @@ -289,6 +301,7 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde public boolean hasDocumentRemove() { return responseTypeCase_ == 6; } + /** * * @@ -308,6 +321,7 @@ public com.google.firestore.v1.DocumentRemove getDocumentRemove() { } return com.google.firestore.v1.DocumentRemove.getDefaultInstance(); } + /** * * @@ -327,6 +341,7 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde } public static final int FILTER_FIELD_NUMBER = 5; + /** * * @@ -346,6 +361,7 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde public boolean hasFilter() { return responseTypeCase_ == 5; } + /** * * @@ -368,6 +384,7 @@ public com.google.firestore.v1.ExistenceFilter getFilter() { } return com.google.firestore.v1.ExistenceFilter.getDefaultInstance(); } + /** * * @@ -622,6 +639,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -907,6 +925,7 @@ public Builder clearResponseType() { com.google.firestore.v1.TargetChange.Builder, com.google.firestore.v1.TargetChangeOrBuilder> targetChangeBuilder_; + /** * * @@ -922,6 +941,7 @@ public Builder clearResponseType() { public boolean hasTargetChange() { return responseTypeCase_ == 2; } + /** * * @@ -947,6 +967,7 @@ public com.google.firestore.v1.TargetChange getTargetChange() { return com.google.firestore.v1.TargetChange.getDefaultInstance(); } } + /** * * @@ -969,6 +990,7 @@ public Builder setTargetChange(com.google.firestore.v1.TargetChange value) { responseTypeCase_ = 2; return this; } + /** * * @@ -988,6 +1010,7 @@ public Builder setTargetChange(com.google.firestore.v1.TargetChange.Builder buil responseTypeCase_ = 2; return this; } + /** * * @@ -1020,6 +1043,7 @@ public Builder mergeTargetChange(com.google.firestore.v1.TargetChange value) { responseTypeCase_ = 2; return this; } + /** * * @@ -1045,6 +1069,7 @@ public Builder clearTargetChange() { } return this; } + /** * * @@ -1057,6 +1082,7 @@ public Builder clearTargetChange() { public com.google.firestore.v1.TargetChange.Builder getTargetChangeBuilder() { return getTargetChangeFieldBuilder().getBuilder(); } + /** * * @@ -1077,6 +1103,7 @@ public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() return com.google.firestore.v1.TargetChange.getDefaultInstance(); } } + /** * * @@ -1115,6 +1142,7 @@ public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() com.google.firestore.v1.DocumentChange.Builder, com.google.firestore.v1.DocumentChangeOrBuilder> documentChangeBuilder_; + /** * * @@ -1130,6 +1158,7 @@ public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() public boolean hasDocumentChange() { return responseTypeCase_ == 3; } + /** * * @@ -1155,6 +1184,7 @@ public com.google.firestore.v1.DocumentChange getDocumentChange() { return com.google.firestore.v1.DocumentChange.getDefaultInstance(); } } + /** * * @@ -1177,6 +1207,7 @@ public Builder setDocumentChange(com.google.firestore.v1.DocumentChange value) { responseTypeCase_ = 3; return this; } + /** * * @@ -1197,6 +1228,7 @@ public Builder setDocumentChange( responseTypeCase_ = 3; return this; } + /** * * @@ -1229,6 +1261,7 @@ public Builder mergeDocumentChange(com.google.firestore.v1.DocumentChange value) responseTypeCase_ = 3; return this; } + /** * * @@ -1254,6 +1287,7 @@ public Builder clearDocumentChange() { } return this; } + /** * * @@ -1266,6 +1300,7 @@ public Builder clearDocumentChange() { public com.google.firestore.v1.DocumentChange.Builder getDocumentChangeBuilder() { return getDocumentChangeFieldBuilder().getBuilder(); } + /** * * @@ -1286,6 +1321,7 @@ public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilde return com.google.firestore.v1.DocumentChange.getDefaultInstance(); } } + /** * * @@ -1324,6 +1360,7 @@ public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilde com.google.firestore.v1.DocumentDelete.Builder, com.google.firestore.v1.DocumentDeleteOrBuilder> documentDeleteBuilder_; + /** * * @@ -1339,6 +1376,7 @@ public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilde public boolean hasDocumentDelete() { return responseTypeCase_ == 4; } + /** * * @@ -1364,6 +1402,7 @@ public com.google.firestore.v1.DocumentDelete getDocumentDelete() { return com.google.firestore.v1.DocumentDelete.getDefaultInstance(); } } + /** * * @@ -1386,6 +1425,7 @@ public Builder setDocumentDelete(com.google.firestore.v1.DocumentDelete value) { responseTypeCase_ = 4; return this; } + /** * * @@ -1406,6 +1446,7 @@ public Builder setDocumentDelete( responseTypeCase_ = 4; return this; } + /** * * @@ -1438,6 +1479,7 @@ public Builder mergeDocumentDelete(com.google.firestore.v1.DocumentDelete value) responseTypeCase_ = 4; return this; } + /** * * @@ -1463,6 +1505,7 @@ public Builder clearDocumentDelete() { } return this; } + /** * * @@ -1475,6 +1518,7 @@ public Builder clearDocumentDelete() { public com.google.firestore.v1.DocumentDelete.Builder getDocumentDeleteBuilder() { return getDocumentDeleteFieldBuilder().getBuilder(); } + /** * * @@ -1495,6 +1539,7 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde return com.google.firestore.v1.DocumentDelete.getDefaultInstance(); } } + /** * * @@ -1533,6 +1578,7 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde com.google.firestore.v1.DocumentRemove.Builder, com.google.firestore.v1.DocumentRemoveOrBuilder> documentRemoveBuilder_; + /** * * @@ -1549,6 +1595,7 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde public boolean hasDocumentRemove() { return responseTypeCase_ == 6; } + /** * * @@ -1575,6 +1622,7 @@ public com.google.firestore.v1.DocumentRemove getDocumentRemove() { return com.google.firestore.v1.DocumentRemove.getDefaultInstance(); } } + /** * * @@ -1598,6 +1646,7 @@ public Builder setDocumentRemove(com.google.firestore.v1.DocumentRemove value) { responseTypeCase_ = 6; return this; } + /** * * @@ -1619,6 +1668,7 @@ public Builder setDocumentRemove( responseTypeCase_ = 6; return this; } + /** * * @@ -1652,6 +1702,7 @@ public Builder mergeDocumentRemove(com.google.firestore.v1.DocumentRemove value) responseTypeCase_ = 6; return this; } + /** * * @@ -1678,6 +1729,7 @@ public Builder clearDocumentRemove() { } return this; } + /** * * @@ -1691,6 +1743,7 @@ public Builder clearDocumentRemove() { public com.google.firestore.v1.DocumentRemove.Builder getDocumentRemoveBuilder() { return getDocumentRemoveFieldBuilder().getBuilder(); } + /** * * @@ -1712,6 +1765,7 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde return com.google.firestore.v1.DocumentRemove.getDefaultInstance(); } } + /** * * @@ -1751,6 +1805,7 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde com.google.firestore.v1.ExistenceFilter.Builder, com.google.firestore.v1.ExistenceFilterOrBuilder> filterBuilder_; + /** * * @@ -1770,6 +1825,7 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde public boolean hasFilter() { return responseTypeCase_ == 5; } + /** * * @@ -1799,6 +1855,7 @@ public com.google.firestore.v1.ExistenceFilter getFilter() { return com.google.firestore.v1.ExistenceFilter.getDefaultInstance(); } } + /** * * @@ -1825,6 +1882,7 @@ public Builder setFilter(com.google.firestore.v1.ExistenceFilter value) { responseTypeCase_ = 5; return this; } + /** * * @@ -1848,6 +1906,7 @@ public Builder setFilter(com.google.firestore.v1.ExistenceFilter.Builder builder responseTypeCase_ = 5; return this; } + /** * * @@ -1884,6 +1943,7 @@ public Builder mergeFilter(com.google.firestore.v1.ExistenceFilter value) { responseTypeCase_ = 5; return this; } + /** * * @@ -1913,6 +1973,7 @@ public Builder clearFilter() { } return this; } + /** * * @@ -1929,6 +1990,7 @@ public Builder clearFilter() { public com.google.firestore.v1.ExistenceFilter.Builder getFilterBuilder() { return getFilterFieldBuilder().getBuilder(); } + /** * * @@ -1953,6 +2015,7 @@ public com.google.firestore.v1.ExistenceFilterOrBuilder getFilterOrBuilder() { return com.google.firestore.v1.ExistenceFilter.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java index bc8cfa0f0..4f02c2d52 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ListenResponseOrBuilder @@ -36,6 +36,7 @@ public interface ListenResponseOrBuilder * @return Whether the targetChange field is set. */ boolean hasTargetChange(); + /** * * @@ -48,6 +49,7 @@ public interface ListenResponseOrBuilder * @return The targetChange. */ com.google.firestore.v1.TargetChange getTargetChange(); + /** * * @@ -71,6 +73,7 @@ public interface ListenResponseOrBuilder * @return Whether the documentChange field is set. */ boolean hasDocumentChange(); + /** * * @@ -83,6 +86,7 @@ public interface ListenResponseOrBuilder * @return The documentChange. */ com.google.firestore.v1.DocumentChange getDocumentChange(); + /** * * @@ -106,6 +110,7 @@ public interface ListenResponseOrBuilder * @return Whether the documentDelete field is set. */ boolean hasDocumentDelete(); + /** * * @@ -118,6 +123,7 @@ public interface ListenResponseOrBuilder * @return The documentDelete. */ com.google.firestore.v1.DocumentDelete getDocumentDelete(); + /** * * @@ -142,6 +148,7 @@ public interface ListenResponseOrBuilder * @return Whether the documentRemove field is set. */ boolean hasDocumentRemove(); + /** * * @@ -155,6 +162,7 @@ public interface ListenResponseOrBuilder * @return The documentRemove. */ com.google.firestore.v1.DocumentRemove getDocumentRemove(); + /** * * @@ -183,6 +191,7 @@ public interface ListenResponseOrBuilder * @return Whether the filter field is set. */ boolean hasFilter(); + /** * * @@ -199,6 +208,7 @@ public interface ListenResponseOrBuilder * @return The filter. */ com.google.firestore.v1.ExistenceFilter getFilter(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java index 4a5433238..5531436e2 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class MapValue extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.MapValue) MapValueOrBuilder { private static final long serialVersionUID = 0L; + // Use MapValue.newBuilder() to construct. private MapValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -101,6 +102,7 @@ private static final class FieldsDefaultEntryHolder { public int getFieldsCount() { return internalGetFields().getMap().size(); } + /** * * @@ -122,12 +124,14 @@ public boolean containsFields(java.lang.String key) { } return internalGetFields().getMap().containsKey(key); } + /** Use {@link #getFieldsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); } + /** * * @@ -146,6 +150,7 @@ public java.util.Map getFields( public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } + /** * * @@ -172,6 +177,7 @@ public java.util.Map getFieldsM internalGetFields().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -364,6 +370,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -589,7 +596,8 @@ public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilde defaultEntry() { return FieldsDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final FieldsConverter fieldsConverter = new FieldsConverter(); @@ -629,6 +637,7 @@ public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilde public int getFieldsCount() { return internalGetFields().ensureBuilderMap().size(); } + /** * * @@ -650,12 +659,14 @@ public boolean containsFields(java.lang.String key) { } return internalGetFields().ensureBuilderMap().containsKey(key); } + /** Use {@link #getFieldsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); } + /** * * @@ -674,6 +685,7 @@ public java.util.Map getFields( public java.util.Map getFieldsMap() { return internalGetFields().getImmutableMap(); } + /** * * @@ -700,6 +712,7 @@ public java.util.Map getFieldsM internalGetMutableFields().ensureBuilderMap(); return map.containsKey(key) ? fieldsConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -732,6 +745,7 @@ public Builder clearFields() { internalGetMutableFields().clear(); return this; } + /** * * @@ -753,12 +767,14 @@ public Builder removeFields(java.lang.String key) { internalGetMutableFields().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableFields() { bitField0_ |= 0x00000001; return internalGetMutableFields().ensureMessageMap(); } + /** * * @@ -784,6 +800,7 @@ public Builder putFields(java.lang.String key, com.google.firestore.v1.Value val bitField0_ |= 0x00000001; return this; } + /** * * @@ -810,6 +827,7 @@ public Builder putAllFields( bitField0_ |= 0x00000001; return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValueOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValueOrBuilder.java index 1a98de9e0..3a95b4421 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValueOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValueOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface MapValueOrBuilder @@ -39,6 +39,7 @@ public interface MapValueOrBuilder * map<string, .google.firestore.v1.Value> fields = 1; */ int getFieldsCount(); + /** * * @@ -54,9 +55,11 @@ public interface MapValueOrBuilder * map<string, .google.firestore.v1.Value> fields = 1; */ boolean containsFields(java.lang.String key); + /** Use {@link #getFieldsMap()} instead. */ @java.lang.Deprecated java.util.Map getFields(); + /** * * @@ -72,6 +75,7 @@ public interface MapValueOrBuilder * map<string, .google.firestore.v1.Value> fields = 1; */ java.util.Map getFieldsMap(); + /** * * @@ -91,6 +95,7 @@ com.google.firestore.v1.Value getFieldsOrDefault( java.lang.String key, /* nullable */ com.google.firestore.v1.Value defaultValue); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequest.java index 37f05fb6d..f6d276a14 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class PartitionQueryRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.v1.PartitionQueryRequest) PartitionQueryRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use PartitionQueryRequest.newBuilder() to construct. private PartitionQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public enum QueryTypeCase private QueryTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -127,6 +129,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -161,6 +164,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -187,6 +191,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -215,6 +220,7 @@ public com.google.protobuf.ByteString getParentBytes() { } public static final int STRUCTURED_QUERY_FIELD_NUMBER = 2; + /** * * @@ -233,6 +239,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -254,6 +261,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { } return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } + /** * * @@ -276,6 +284,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public static final int PARTITION_COUNT_FIELD_NUMBER = 3; private long partitionCount_ = 0L; + /** * * @@ -303,6 +312,7 @@ public long getPartitionCount() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -338,6 +348,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -376,6 +387,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 5; private int pageSize_ = 0; + /** * * @@ -399,6 +411,7 @@ public int getPageSize() { } public static final int READ_TIME_FIELD_NUMBER = 6; + /** * * @@ -418,6 +431,7 @@ public int getPageSize() { public boolean hasReadTime() { return consistencySelectorCase_ == 6; } + /** * * @@ -440,6 +454,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -695,6 +710,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1006,6 +1022,7 @@ public Builder clearConsistencySelector() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -1031,6 +1048,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -1056,6 +1074,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1080,6 +1099,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1100,6 +1120,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -1131,6 +1152,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.StructuredQuery.Builder, com.google.firestore.v1.StructuredQueryOrBuilder> structuredQueryBuilder_; + /** * * @@ -1149,6 +1171,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -1177,6 +1200,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -1202,6 +1226,7 @@ public Builder setStructuredQuery(com.google.firestore.v1.StructuredQuery value) queryTypeCase_ = 2; return this; } + /** * * @@ -1225,6 +1250,7 @@ public Builder setStructuredQuery( queryTypeCase_ = 2; return this; } + /** * * @@ -1260,6 +1286,7 @@ public Builder mergeStructuredQuery(com.google.firestore.v1.StructuredQuery valu queryTypeCase_ = 2; return this; } + /** * * @@ -1288,6 +1315,7 @@ public Builder clearStructuredQuery() { } return this; } + /** * * @@ -1303,6 +1331,7 @@ public Builder clearStructuredQuery() { public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder() { return getStructuredQueryFieldBuilder().getBuilder(); } + /** * * @@ -1326,6 +1355,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -1363,6 +1393,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil } private long partitionCount_; + /** * * @@ -1385,6 +1416,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public long getPartitionCount() { return partitionCount_; } + /** * * @@ -1411,6 +1443,7 @@ public Builder setPartitionCount(long value) { onChanged(); return this; } + /** * * @@ -1437,6 +1470,7 @@ public Builder clearPartitionCount() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -1471,6 +1505,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1505,6 +1540,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1538,6 +1574,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1567,6 +1604,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1603,6 +1641,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -1624,6 +1663,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -1649,6 +1689,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -1678,6 +1719,7 @@ public Builder clearPageSize() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1697,6 +1739,7 @@ public Builder clearPageSize() { public boolean hasReadTime() { return consistencySelectorCase_ == 6; } + /** * * @@ -1726,6 +1769,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1752,6 +1796,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 6; return this; } + /** * * @@ -1775,6 +1820,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 6; return this; } + /** * * @@ -1811,6 +1857,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 6; return this; } + /** * * @@ -1840,6 +1887,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -1856,6 +1904,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1880,6 +1929,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequestOrBuilder.java index 3290dfd4a..ba9b9ef88 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface PartitionQueryRequestOrBuilder @@ -39,6 +39,7 @@ public interface PartitionQueryRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -70,6 +71,7 @@ public interface PartitionQueryRequestOrBuilder * @return Whether the structuredQuery field is set. */ boolean hasStructuredQuery(); + /** * * @@ -85,6 +87,7 @@ public interface PartitionQueryRequestOrBuilder * @return The structuredQuery. */ com.google.firestore.v1.StructuredQuery getStructuredQuery(); + /** * * @@ -143,6 +146,7 @@ public interface PartitionQueryRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * @@ -203,6 +207,7 @@ public interface PartitionQueryRequestOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -219,6 +224,7 @@ public interface PartitionQueryRequestOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponse.java index 2541adef6..c8780a3cb 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class PartitionQueryResponse extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.v1.PartitionQueryResponse) PartitionQueryResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use PartitionQueryResponse.newBuilder() to construct. private PartitionQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List partitions_; + /** * * @@ -98,6 +100,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getPartitionsList() { return partitions_; } + /** * * @@ -128,6 +131,7 @@ public java.util.List getPartitionsList() { getPartitionsOrBuilderList() { return partitions_; } + /** * * @@ -157,6 +161,7 @@ public java.util.List getPartitionsList() { public int getPartitionsCount() { return partitions_.size(); } + /** * * @@ -186,6 +191,7 @@ public int getPartitionsCount() { public com.google.firestore.v1.Cursor getPartitions(int index) { return partitions_.get(index); } + /** * * @@ -220,6 +226,7 @@ public com.google.firestore.v1.CursorOrBuilder getPartitionsOrBuilder(int index) @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -245,6 +252,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -441,6 +449,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -731,6 +740,7 @@ public java.util.List getPartitionsList() { return partitionsBuilder_.getMessageList(); } } + /** * * @@ -763,6 +773,7 @@ public int getPartitionsCount() { return partitionsBuilder_.getCount(); } } + /** * * @@ -795,6 +806,7 @@ public com.google.firestore.v1.Cursor getPartitions(int index) { return partitionsBuilder_.getMessage(index); } } + /** * * @@ -833,6 +845,7 @@ public Builder setPartitions(int index, com.google.firestore.v1.Cursor value) { } return this; } + /** * * @@ -869,6 +882,7 @@ public Builder setPartitions( } return this; } + /** * * @@ -907,6 +921,7 @@ public Builder addPartitions(com.google.firestore.v1.Cursor value) { } return this; } + /** * * @@ -945,6 +960,7 @@ public Builder addPartitions(int index, com.google.firestore.v1.Cursor value) { } return this; } + /** * * @@ -980,6 +996,7 @@ public Builder addPartitions(com.google.firestore.v1.Cursor.Builder builderForVa } return this; } + /** * * @@ -1016,6 +1033,7 @@ public Builder addPartitions( } return this; } + /** * * @@ -1052,6 +1070,7 @@ public Builder addAllPartitions( } return this; } + /** * * @@ -1087,6 +1106,7 @@ public Builder clearPartitions() { } return this; } + /** * * @@ -1122,6 +1142,7 @@ public Builder removePartitions(int index) { } return this; } + /** * * @@ -1150,6 +1171,7 @@ public Builder removePartitions(int index) { public com.google.firestore.v1.Cursor.Builder getPartitionsBuilder(int index) { return getPartitionsFieldBuilder().getBuilder(index); } + /** * * @@ -1182,6 +1204,7 @@ public com.google.firestore.v1.CursorOrBuilder getPartitionsOrBuilder(int index) return partitionsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1215,6 +1238,7 @@ public com.google.firestore.v1.CursorOrBuilder getPartitionsOrBuilder(int index) return java.util.Collections.unmodifiableList(partitions_); } } + /** * * @@ -1244,6 +1268,7 @@ public com.google.firestore.v1.Cursor.Builder addPartitionsBuilder() { return getPartitionsFieldBuilder() .addBuilder(com.google.firestore.v1.Cursor.getDefaultInstance()); } + /** * * @@ -1273,6 +1298,7 @@ public com.google.firestore.v1.Cursor.Builder addPartitionsBuilder(int index) { return getPartitionsFieldBuilder() .addBuilder(index, com.google.firestore.v1.Cursor.getDefaultInstance()); } + /** * * @@ -1320,6 +1346,7 @@ public java.util.List getPartitionsBuild } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1344,6 +1371,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1368,6 +1396,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1391,6 +1420,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1410,6 +1440,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponseOrBuilder.java index 7c18b646c..a54a16d96 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface PartitionQueryResponseOrBuilder @@ -50,6 +50,7 @@ public interface PartitionQueryResponseOrBuilder * repeated .google.firestore.v1.Cursor partitions = 1; */ java.util.List getPartitionsList(); + /** * * @@ -76,6 +77,7 @@ public interface PartitionQueryResponseOrBuilder * repeated .google.firestore.v1.Cursor partitions = 1; */ com.google.firestore.v1.Cursor getPartitions(int index); + /** * * @@ -102,6 +104,7 @@ public interface PartitionQueryResponseOrBuilder * repeated .google.firestore.v1.Cursor partitions = 1; */ int getPartitionsCount(); + /** * * @@ -128,6 +131,7 @@ public interface PartitionQueryResponseOrBuilder * repeated .google.firestore.v1.Cursor partitions = 1; */ java.util.List getPartitionsOrBuilderList(); + /** * * @@ -169,6 +173,7 @@ public interface PartitionQueryResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Pipeline.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Pipeline.java new file mode 100644 index 000000000..2abe9fed5 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Pipeline.java @@ -0,0 +1,2848 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/document.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +/** + * + * + *
+ * A Firestore query represented as an ordered list of operations / stages.
+ * 
+ * + * Protobuf type {@code google.firestore.v1.Pipeline} + */ +public final class Pipeline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.Pipeline) + PipelineOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Pipeline.newBuilder() to construct. + private Pipeline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Pipeline() { + stages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Pipeline(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.Pipeline.class, com.google.firestore.v1.Pipeline.Builder.class); + } + + public interface StageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.Pipeline.Stage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the stage to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+     * Required. The name of the stage to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getArgsList(); + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.v1.Value getArgs(int index); + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getArgsCount(); + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getArgsOrBuilderList(); + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.v1.ValueOrBuilder getArgsOrBuilder(int index); + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getOptionsCount(); + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsOptions(java.lang.String key); + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOptions(); + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getOptionsMap(); + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue); + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key); + } + + /** + * + * + *
+   * A single operation within a pipeline.
+   *
+   * A stage is made up of a unique name, and a list of arguments. The exact
+   * number of arguments & types is dependent on the stage type.
+   *
+   * To give an example, the stage `filter(state = "MD")` would be encoded as:
+   *
+   * ```
+   * name: "filter"
+   * args {
+   *   function_value {
+   *     name: "eq"
+   *     args { field_reference_value: "state" }
+   *     args { string_value: "MD" }
+   *   }
+   * }
+   * ```
+   *
+   * See public documentation for the full list.
+   * 
+ * + * Protobuf type {@code google.firestore.v1.Pipeline.Stage} + */ + public static final class Stage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.Pipeline.Stage) + StageOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Stage.newBuilder() to construct. + private Stage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Stage() { + name_ = ""; + args_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Stage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_Stage_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_Stage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.Pipeline.Stage.class, + com.google.firestore.v1.Pipeline.Stage.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the stage to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The name of the stage to evaluate.
+     *
+     * **Requires:**
+     *
+     * * must be in snake case (lower case with underscore separator).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List args_; + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getArgsList() { + return args_; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getArgsOrBuilderList() { + return args_; + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getArgsCount() { + return args_.size(); + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getArgs(int index) { + return args_.get(index); + } + + /** + * + * + *
+     * Optional. Ordered list of arguments the given stage expects.
+     * 
+ * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.ValueOrBuilder getArgsOrBuilder(int index) { + return args_.get(index); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + + private static final class OptionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_Stage_OptionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.firestore.v1.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField options_; + + private com.google.protobuf.MapField + internalGetOptions() { + if (options_ == null) { + return com.google.protobuf.MapField.emptyMapField(OptionsDefaultEntryHolder.defaultEntry); + } + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().getMap().size(); + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOptions().getMap().containsKey(key); + } + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getMap(); + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Optional named arguments that certain functions may support.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < args_.size(); i++) { + output.writeMessage(2, args_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetOptions(), OptionsDefaultEntryHolder.defaultEntry, 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < args_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, args_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetOptions().getMap().entrySet()) { + com.google.protobuf.MapEntry options__ = + OptionsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, options__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.Pipeline.Stage)) { + return super.equals(obj); + } + com.google.firestore.v1.Pipeline.Stage other = (com.google.firestore.v1.Pipeline.Stage) obj; + + if (!getName().equals(other.getName())) return false; + if (!getArgsList().equals(other.getArgsList())) return false; + if (!internalGetOptions().equals(other.internalGetOptions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + if (!internalGetOptions().getMap().isEmpty()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline.Stage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Pipeline.Stage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Pipeline.Stage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.Pipeline.Stage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A single operation within a pipeline.
+     *
+     * A stage is made up of a unique name, and a list of arguments. The exact
+     * number of arguments & types is dependent on the stage type.
+     *
+     * To give an example, the stage `filter(state = "MD")` would be encoded as:
+     *
+     * ```
+     * name: "filter"
+     * args {
+     *   function_value {
+     *     name: "eq"
+     *     args { field_reference_value: "state" }
+     *     args { string_value: "MD" }
+     *   }
+     * }
+     * ```
+     *
+     * See public documentation for the full list.
+     * 
+ * + * Protobuf type {@code google.firestore.v1.Pipeline.Stage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.Pipeline.Stage) + com.google.firestore.v1.Pipeline.StageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_Stage_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_Stage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.Pipeline.Stage.class, + com.google.firestore.v1.Pipeline.Stage.Builder.class); + } + + // Construct using com.google.firestore.v1.Pipeline.Stage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (argsBuilder_ == null) { + args_ = java.util.Collections.emptyList(); + } else { + args_ = null; + argsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableOptions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_Stage_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline.Stage getDefaultInstanceForType() { + return com.google.firestore.v1.Pipeline.Stage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline.Stage build() { + com.google.firestore.v1.Pipeline.Stage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline.Stage buildPartial() { + com.google.firestore.v1.Pipeline.Stage result = + new com.google.firestore.v1.Pipeline.Stage(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.firestore.v1.Pipeline.Stage result) { + if (argsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + args_ = java.util.Collections.unmodifiableList(args_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.args_ = args_; + } else { + result.args_ = argsBuilder_.build(); + } + } + + private void buildPartial0(com.google.firestore.v1.Pipeline.Stage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.options_ = internalGetOptions().build(OptionsDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.Pipeline.Stage) { + return mergeFrom((com.google.firestore.v1.Pipeline.Stage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.Pipeline.Stage other) { + if (other == com.google.firestore.v1.Pipeline.Stage.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (argsBuilder_ == null) { + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + } else { + if (!other.args_.isEmpty()) { + if (argsBuilder_.isEmpty()) { + argsBuilder_.dispose(); + argsBuilder_ = null; + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + argsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getArgsFieldBuilder() + : null; + } else { + argsBuilder_.addAllMessages(other.args_); + } + } + } + internalGetMutableOptions().mergeFrom(other.internalGetOptions()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.firestore.v1.Value m = + input.readMessage(com.google.firestore.v1.Value.parser(), extensionRegistry); + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.add(m); + } else { + argsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry + options__ = + input.readMessage( + OptionsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableOptions() + .ensureBuilderMap() + .put(options__.getKey(), options__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+       * Required. The name of the stage to evaluate.
+       *
+       * **Requires:**
+       *
+       * * must be in snake case (lower case with underscore separator).
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The name of the stage to evaluate.
+       *
+       * **Requires:**
+       *
+       * * must be in snake case (lower case with underscore separator).
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The name of the stage to evaluate.
+       *
+       * **Requires:**
+       *
+       * * must be in snake case (lower case with underscore separator).
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the stage to evaluate.
+       *
+       * **Requires:**
+       *
+       * * must be in snake case (lower case with underscore separator).
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the stage to evaluate.
+       *
+       * **Requires:**
+       *
+       * * must be in snake case (lower case with underscore separator).
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List args_ = + java.util.Collections.emptyList(); + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + args_ = new java.util.ArrayList(args_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder, + com.google.firestore.v1.ValueOrBuilder> + argsBuilder_; + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getArgsList() { + if (argsBuilder_ == null) { + return java.util.Collections.unmodifiableList(args_); + } else { + return argsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getArgsCount() { + if (argsBuilder_ == null) { + return args_.size(); + } else { + return argsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value getArgs(int index) { + if (argsBuilder_ == null) { + return args_.get(index); + } else { + return argsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setArgs(int index, com.google.firestore.v1.Value value) { + if (argsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + } else { + argsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setArgs(int index, com.google.firestore.v1.Value.Builder builderForValue) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.set(index, builderForValue.build()); + onChanged(); + } else { + argsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(com.google.firestore.v1.Value value) { + if (argsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + } else { + argsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(int index, com.google.firestore.v1.Value value) { + if (argsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(index, value); + onChanged(); + } else { + argsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(com.google.firestore.v1.Value.Builder builderForValue) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.add(builderForValue.build()); + onChanged(); + } else { + argsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArgs(int index, com.google.firestore.v1.Value.Builder builderForValue) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.add(index, builderForValue.build()); + onChanged(); + } else { + argsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllArgs( + java.lang.Iterable values) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + } else { + argsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearArgs() { + if (argsBuilder_ == null) { + args_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + argsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeArgs(int index) { + if (argsBuilder_ == null) { + ensureArgsIsMutable(); + args_.remove(index); + onChanged(); + } else { + argsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder getArgsBuilder(int index) { + return getArgsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.ValueOrBuilder getArgsOrBuilder(int index) { + if (argsBuilder_ == null) { + return args_.get(index); + } else { + return argsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getArgsOrBuilderList() { + if (argsBuilder_ != null) { + return argsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(args_); + } + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder addArgsBuilder() { + return getArgsFieldBuilder().addBuilder(com.google.firestore.v1.Value.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder addArgsBuilder(int index) { + return getArgsFieldBuilder() + .addBuilder(index, com.google.firestore.v1.Value.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. Ordered list of arguments the given stage expects.
+       * 
+ * + * + * repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getArgsBuilderList() { + return getArgsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder, + com.google.firestore.v1.ValueOrBuilder> + getArgsFieldBuilder() { + if (argsBuilder_ == null) { + argsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder, + com.google.firestore.v1.ValueOrBuilder>( + args_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + args_ = null; + } + return argsBuilder_; + } + + private static final class OptionsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value> { + @java.lang.Override + public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilder val) { + if (val instanceof com.google.firestore.v1.Value) { + return (com.google.firestore.v1.Value) val; + } + return ((com.google.firestore.v1.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return OptionsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final OptionsConverter optionsConverter = new OptionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + options_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + internalGetOptions() { + if (options_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(optionsConverter); + } + return options_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + internalGetMutableOptions() { + if (options_ == null) { + options_ = new com.google.protobuf.MapFieldBuilder<>(optionsConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().ensureBuilderMap().size(); + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOptions().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getImmutableMap(); + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableOptions().ensureBuilderMap(); + return map.containsKey(key) ? optionsConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableOptions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return optionsConverter.build(map.get(key)); + } + + public Builder clearOptions() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableOptions().clear(); + return this; + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableOptions().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableOptions() { + bitField0_ |= 0x00000004; + return internalGetMutableOptions().ensureMessageMap(); + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putOptions(java.lang.String key, com.google.firestore.v1.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableOptions().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllOptions( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableOptions().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + /** + * + * + *
+       * Optional. Optional named arguments that certain functions may support.
+       * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder putOptionsBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableOptions().ensureBuilderMap(); + com.google.firestore.v1.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.firestore.v1.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.firestore.v1.Value) { + entry = ((com.google.firestore.v1.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.firestore.v1.Value.Builder) entry; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.Pipeline.Stage) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.Pipeline.Stage) + private static final com.google.firestore.v1.Pipeline.Stage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.Pipeline.Stage(); + } + + public static com.google.firestore.v1.Pipeline.Stage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline.Stage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int STAGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List stages_; + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getStagesList() { + return stages_; + } + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getStagesOrBuilderList() { + return stages_; + } + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getStagesCount() { + return stages_.size(); + } + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Pipeline.Stage getStages(int index) { + return stages_.get(index); + } + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Pipeline.StageOrBuilder getStagesOrBuilder(int index) { + return stages_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < stages_.size(); i++) { + output.writeMessage(1, stages_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < stages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, stages_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.Pipeline)) { + return super.equals(obj); + } + com.google.firestore.v1.Pipeline other = (com.google.firestore.v1.Pipeline) obj; + + if (!getStagesList().equals(other.getStagesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getStagesCount() > 0) { + hash = (37 * hash) + STAGES_FIELD_NUMBER; + hash = (53 * hash) + getStagesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.Pipeline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Pipeline parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Pipeline parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.Pipeline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Pipeline parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Pipeline parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.Pipeline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.Pipeline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.Pipeline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A Firestore query represented as an ordered list of operations / stages.
+   * 
+ * + * Protobuf type {@code google.firestore.v1.Pipeline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.Pipeline) + com.google.firestore.v1.PipelineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.Pipeline.class, + com.google.firestore.v1.Pipeline.Builder.class); + } + + // Construct using com.google.firestore.v1.Pipeline.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stagesBuilder_ == null) { + stages_ = java.util.Collections.emptyList(); + } else { + stages_ = null; + stagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.DocumentProto + .internal_static_google_firestore_v1_Pipeline_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline getDefaultInstanceForType() { + return com.google.firestore.v1.Pipeline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline build() { + com.google.firestore.v1.Pipeline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline buildPartial() { + com.google.firestore.v1.Pipeline result = new com.google.firestore.v1.Pipeline(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.firestore.v1.Pipeline result) { + if (stagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + stages_ = java.util.Collections.unmodifiableList(stages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.stages_ = stages_; + } else { + result.stages_ = stagesBuilder_.build(); + } + } + + private void buildPartial0(com.google.firestore.v1.Pipeline result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.Pipeline) { + return mergeFrom((com.google.firestore.v1.Pipeline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.Pipeline other) { + if (other == com.google.firestore.v1.Pipeline.getDefaultInstance()) return this; + if (stagesBuilder_ == null) { + if (!other.stages_.isEmpty()) { + if (stages_.isEmpty()) { + stages_ = other.stages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStagesIsMutable(); + stages_.addAll(other.stages_); + } + onChanged(); + } + } else { + if (!other.stages_.isEmpty()) { + if (stagesBuilder_.isEmpty()) { + stagesBuilder_.dispose(); + stagesBuilder_ = null; + stages_ = other.stages_; + bitField0_ = (bitField0_ & ~0x00000001); + stagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStagesFieldBuilder() + : null; + } else { + stagesBuilder_.addAllMessages(other.stages_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.firestore.v1.Pipeline.Stage m = + input.readMessage( + com.google.firestore.v1.Pipeline.Stage.parser(), extensionRegistry); + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(m); + } else { + stagesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List stages_ = + java.util.Collections.emptyList(); + + private void ensureStagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + stages_ = new java.util.ArrayList(stages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Pipeline.Stage, + com.google.firestore.v1.Pipeline.Stage.Builder, + com.google.firestore.v1.Pipeline.StageOrBuilder> + stagesBuilder_; + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getStagesList() { + if (stagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(stages_); + } else { + return stagesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getStagesCount() { + if (stagesBuilder_ == null) { + return stages_.size(); + } else { + return stagesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.v1.Pipeline.Stage getStages(int index) { + if (stagesBuilder_ == null) { + return stages_.get(index); + } else { + return stagesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStages(int index, com.google.firestore.v1.Pipeline.Stage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.set(index, value); + onChanged(); + } else { + stagesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStages( + int index, com.google.firestore.v1.Pipeline.Stage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.set(index, builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStages(com.google.firestore.v1.Pipeline.Stage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.add(value); + onChanged(); + } else { + stagesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStages(int index, com.google.firestore.v1.Pipeline.Stage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.add(index, value); + onChanged(); + } else { + stagesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStages(com.google.firestore.v1.Pipeline.Stage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStages( + int index, com.google.firestore.v1.Pipeline.Stage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(index, builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllStages( + java.lang.Iterable values) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stages_); + onChanged(); + } else { + stagesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStages() { + if (stagesBuilder_ == null) { + stages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + stagesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeStages(int index) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.remove(index); + onChanged(); + } else { + stagesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.v1.Pipeline.Stage.Builder getStagesBuilder(int index) { + return getStagesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.v1.Pipeline.StageOrBuilder getStagesOrBuilder(int index) { + if (stagesBuilder_ == null) { + return stages_.get(index); + } else { + return stagesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getStagesOrBuilderList() { + if (stagesBuilder_ != null) { + return stagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(stages_); + } + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.v1.Pipeline.Stage.Builder addStagesBuilder() { + return getStagesFieldBuilder() + .addBuilder(com.google.firestore.v1.Pipeline.Stage.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.v1.Pipeline.Stage.Builder addStagesBuilder(int index) { + return getStagesFieldBuilder() + .addBuilder(index, com.google.firestore.v1.Pipeline.Stage.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Ordered list of stages to evaluate.
+     * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getStagesBuilderList() { + return getStagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Pipeline.Stage, + com.google.firestore.v1.Pipeline.Stage.Builder, + com.google.firestore.v1.Pipeline.StageOrBuilder> + getStagesFieldBuilder() { + if (stagesBuilder_ == null) { + stagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Pipeline.Stage, + com.google.firestore.v1.Pipeline.Stage.Builder, + com.google.firestore.v1.Pipeline.StageOrBuilder>( + stages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + stages_ = null; + } + return stagesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.Pipeline) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.Pipeline) + private static final com.google.firestore.v1.Pipeline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.Pipeline(); + } + + public static com.google.firestore.v1.Pipeline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pipeline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.Pipeline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PipelineOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PipelineOrBuilder.java new file mode 100644 index 000000000..e085fc4ef --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PipelineOrBuilder.java @@ -0,0 +1,92 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/document.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public interface PipelineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.Pipeline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getStagesList(); + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.firestore.v1.Pipeline.Stage getStages(int index); + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getStagesCount(); + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getStagesOrBuilderList(); + + /** + * + * + *
+   * Required. Ordered list of stages to evaluate.
+   * 
+ * + * + * repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.firestore.v1.Pipeline.StageOrBuilder getStagesOrBuilder(int index); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PipelineProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PipelineProto.java new file mode 100644 index 000000000..2f499b8ca --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PipelineProto.java @@ -0,0 +1,97 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/pipeline.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public final class PipelineProto { + private PipelineProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_StructuredPipeline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_StructuredPipeline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_StructuredPipeline_OptionsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_StructuredPipeline_OptionsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\"google/firestore/v1/pipeline.proto\022\023go" + + "ogle.firestore.v1\032\037google/api/field_beha" + + "vior.proto\032\"google/firestore/v1/document" + + ".proto\"\342\001\n\022StructuredPipeline\0224\n\010pipelin" + + "e\030\001 \001(\0132\035.google.firestore.v1.PipelineB\003" + + "\340A\002\022J\n\007options\030\002 \003(\01324.google.firestore." + + "v1.StructuredPipeline.OptionsEntryB\003\340A\001\032" + + "J\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 " + + "\001(\0132\032.google.firestore.v1.Value:\0028\001B\305\001\n\027" + + "com.google.firestore.v1B\rPipelineProtoP\001" + + "Z;cloud.google.com/go/firestore/apiv1/fi" + + "restorepb;firestorepb\242\002\004GCFS\252\002\031Google.Cl" + + "oud.Firestore.V1\312\002\031Google\\Cloud\\Firestor" + + "e\\V1\352\002\034Google::Cloud::Firestore::V1b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.firestore.v1.DocumentProto.getDescriptor(), + }); + internal_static_google_firestore_v1_StructuredPipeline_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_v1_StructuredPipeline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_StructuredPipeline_descriptor, + new java.lang.String[] { + "Pipeline", "Options", + }); + internal_static_google_firestore_v1_StructuredPipeline_OptionsEntry_descriptor = + internal_static_google_firestore_v1_StructuredPipeline_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_v1_StructuredPipeline_OptionsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_StructuredPipeline_OptionsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.firestore.v1.DocumentProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummary.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummary.java index 0c7bf4202..3fb8d3fde 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummary.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummary.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class PlanSummary extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.PlanSummary) PlanSummaryOrBuilder { private static final long serialVersionUID = 0L; + // Use PlanSummary.newBuilder() to construct. private PlanSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List indexesUsed_; + /** * * @@ -84,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getIndexesUsedList() { return indexesUsed_; } + /** * * @@ -102,6 +105,7 @@ public java.util.List getIndexesUsedList() { getIndexesUsedOrBuilderList() { return indexesUsed_; } + /** * * @@ -119,6 +123,7 @@ public java.util.List getIndexesUsedList() { public int getIndexesUsedCount() { return indexesUsed_.size(); } + /** * * @@ -136,6 +141,7 @@ public int getIndexesUsedCount() { public com.google.protobuf.Struct getIndexesUsed(int index) { return indexesUsed_.get(index); } + /** * * @@ -313,6 +319,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -574,6 +581,7 @@ public java.util.List getIndexesUsedList() { return indexesUsedBuilder_.getMessageList(); } } + /** * * @@ -594,6 +602,7 @@ public int getIndexesUsedCount() { return indexesUsedBuilder_.getCount(); } } + /** * * @@ -614,6 +623,7 @@ public com.google.protobuf.Struct getIndexesUsed(int index) { return indexesUsedBuilder_.getMessage(index); } } + /** * * @@ -640,6 +650,7 @@ public Builder setIndexesUsed(int index, com.google.protobuf.Struct value) { } return this; } + /** * * @@ -663,6 +674,7 @@ public Builder setIndexesUsed(int index, com.google.protobuf.Struct.Builder buil } return this; } + /** * * @@ -689,6 +701,7 @@ public Builder addIndexesUsed(com.google.protobuf.Struct value) { } return this; } + /** * * @@ -715,6 +728,7 @@ public Builder addIndexesUsed(int index, com.google.protobuf.Struct value) { } return this; } + /** * * @@ -738,6 +752,7 @@ public Builder addIndexesUsed(com.google.protobuf.Struct.Builder builderForValue } return this; } + /** * * @@ -761,6 +776,7 @@ public Builder addIndexesUsed(int index, com.google.protobuf.Struct.Builder buil } return this; } + /** * * @@ -785,6 +801,7 @@ public Builder addAllIndexesUsed( } return this; } + /** * * @@ -808,6 +825,7 @@ public Builder clearIndexesUsed() { } return this; } + /** * * @@ -831,6 +849,7 @@ public Builder removeIndexesUsed(int index) { } return this; } + /** * * @@ -847,6 +866,7 @@ public Builder removeIndexesUsed(int index) { public com.google.protobuf.Struct.Builder getIndexesUsedBuilder(int index) { return getIndexesUsedFieldBuilder().getBuilder(index); } + /** * * @@ -867,6 +887,7 @@ public com.google.protobuf.StructOrBuilder getIndexesUsedOrBuilder(int index) { return indexesUsedBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -888,6 +909,7 @@ public com.google.protobuf.StructOrBuilder getIndexesUsedOrBuilder(int index) { return java.util.Collections.unmodifiableList(indexesUsed_); } } + /** * * @@ -905,6 +927,7 @@ public com.google.protobuf.Struct.Builder addIndexesUsedBuilder() { return getIndexesUsedFieldBuilder() .addBuilder(com.google.protobuf.Struct.getDefaultInstance()); } + /** * * @@ -922,6 +945,7 @@ public com.google.protobuf.Struct.Builder addIndexesUsedBuilder(int index) { return getIndexesUsedFieldBuilder() .addBuilder(index, com.google.protobuf.Struct.getDefaultInstance()); } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummaryOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummaryOrBuilder.java index 9bdf339a9..3a0e7c863 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummaryOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PlanSummaryOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface PlanSummaryOrBuilder @@ -38,6 +38,7 @@ public interface PlanSummaryOrBuilder * repeated .google.protobuf.Struct indexes_used = 1; */ java.util.List getIndexesUsedList(); + /** * * @@ -52,6 +53,7 @@ public interface PlanSummaryOrBuilder * repeated .google.protobuf.Struct indexes_used = 1; */ com.google.protobuf.Struct getIndexesUsed(int index); + /** * * @@ -66,6 +68,7 @@ public interface PlanSummaryOrBuilder * repeated .google.protobuf.Struct indexes_used = 1; */ int getIndexesUsedCount(); + /** * * @@ -80,6 +83,7 @@ public interface PlanSummaryOrBuilder * repeated .google.protobuf.Struct indexes_used = 1; */ java.util.List getIndexesUsedOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java index bb966f20f..b0c290ec0 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class Precondition extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.Precondition) PreconditionOrBuilder { private static final long serialVersionUID = 0L; + // Use Precondition.newBuilder() to construct. private Precondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -78,6 +79,7 @@ public enum ConditionTypeCase private ConditionTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -111,6 +113,7 @@ public ConditionTypeCase getConditionTypeCase() { } public static final int EXISTS_FIELD_NUMBER = 1; + /** * * @@ -127,6 +130,7 @@ public ConditionTypeCase getConditionTypeCase() { public boolean hasExists() { return conditionTypeCase_ == 1; } + /** * * @@ -148,6 +152,7 @@ public boolean getExists() { } public static final int UPDATE_TIME_FIELD_NUMBER = 2; + /** * * @@ -164,6 +169,7 @@ public boolean getExists() { public boolean hasUpdateTime() { return conditionTypeCase_ == 2; } + /** * * @@ -183,6 +189,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -388,6 +395,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -625,6 +633,7 @@ public Builder clearConditionType() { public boolean hasExists() { return conditionTypeCase_ == 1; } + /** * * @@ -643,6 +652,7 @@ public boolean getExists() { } return false; } + /** * * @@ -663,6 +673,7 @@ public Builder setExists(boolean value) { onChanged(); return this; } + /** * * @@ -689,6 +700,7 @@ public Builder clearExists() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** * * @@ -705,6 +717,7 @@ public Builder clearExists() { public boolean hasUpdateTime() { return conditionTypeCase_ == 2; } + /** * * @@ -731,6 +744,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -754,6 +768,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { conditionTypeCase_ = 2; return this; } + /** * * @@ -774,6 +789,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal conditionTypeCase_ = 2; return this; } + /** * * @@ -807,6 +823,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { conditionTypeCase_ = 2; return this; } + /** * * @@ -833,6 +850,7 @@ public Builder clearUpdateTime() { } return this; } + /** * * @@ -846,6 +864,7 @@ public Builder clearUpdateTime() { public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { return getUpdateTimeFieldBuilder().getBuilder(); } + /** * * @@ -867,6 +886,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PreconditionOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PreconditionOrBuilder.java index cd2016c33..413e11d45 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PreconditionOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PreconditionOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface PreconditionOrBuilder @@ -37,6 +37,7 @@ public interface PreconditionOrBuilder * @return Whether the exists field is set. */ boolean hasExists(); + /** * * @@ -64,6 +65,7 @@ public interface PreconditionOrBuilder * @return Whether the updateTime field is set. */ boolean hasUpdateTime(); + /** * * @@ -77,6 +79,7 @@ public interface PreconditionOrBuilder * @return The updateTime. */ com.google.protobuf.Timestamp getUpdateTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProfileProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProfileProto.java index a58b1aa00..734fb60c5 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProfileProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProfileProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query_profile.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class QueryProfileProto { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java index b753af417..f663fcb0f 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class QueryProto { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java index 5e3a57f86..7bf7e9a4f 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class RollbackRequest extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.v1.RollbackRequest) RollbackRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use RollbackRequest.newBuilder() to construct. private RollbackRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -92,6 +94,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -119,6 +122,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { public static final int TRANSACTION_FIELD_NUMBER = 2; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -302,6 +306,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -498,6 +503,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object database_ = ""; + /** * * @@ -521,6 +527,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -544,6 +551,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -566,6 +574,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -584,6 +593,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -609,6 +619,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -624,6 +635,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getTransaction() { return transaction_; } + /** * * @@ -645,6 +657,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequestOrBuilder.java index 421909e35..6060d8559 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface RollbackRequestOrBuilder @@ -37,6 +37,7 @@ public interface RollbackRequestOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequest.java index d9972a8c6..976020f3c 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class RunAggregationQueryRequest extends com.google.protobuf.Genera // @@protoc_insertion_point(message_implements:google.firestore.v1.RunAggregationQueryRequest) RunAggregationQueryRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use RunAggregationQueryRequest.newBuilder() to construct. private RunAggregationQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public enum QueryTypeCase private QueryTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -129,6 +131,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -167,6 +170,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -195,6 +199,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -225,6 +230,7 @@ public com.google.protobuf.ByteString getParentBytes() { } public static final int STRUCTURED_AGGREGATION_QUERY_FIELD_NUMBER = 2; + /** * * @@ -240,6 +246,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasStructuredAggregationQuery() { return queryTypeCase_ == 2; } + /** * * @@ -258,6 +265,7 @@ public com.google.firestore.v1.StructuredAggregationQuery getStructuredAggregati } return com.google.firestore.v1.StructuredAggregationQuery.getDefaultInstance(); } + /** * * @@ -277,6 +285,7 @@ public com.google.firestore.v1.StructuredAggregationQuery getStructuredAggregati } public static final int TRANSACTION_FIELD_NUMBER = 4; + /** * * @@ -294,6 +303,7 @@ public com.google.firestore.v1.StructuredAggregationQuery getStructuredAggregati public boolean hasTransaction() { return consistencySelectorCase_ == 4; } + /** * * @@ -316,6 +326,7 @@ public com.google.protobuf.ByteString getTransaction() { } public static final int NEW_TRANSACTION_FIELD_NUMBER = 5; + /** * * @@ -334,6 +345,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } + /** * * @@ -355,6 +367,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { } return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } + /** * * @@ -376,6 +389,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu } public static final int READ_TIME_FIELD_NUMBER = 6; + /** * * @@ -395,6 +409,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu public boolean hasReadTime() { return consistencySelectorCase_ == 6; } + /** * * @@ -417,6 +432,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -440,6 +456,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public static final int EXPLAIN_OPTIONS_FIELD_NUMBER = 8; private com.google.firestore.v1.ExplainOptions explainOptions_; + /** * * @@ -458,6 +475,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean hasExplainOptions() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -478,6 +496,7 @@ public com.google.firestore.v1.ExplainOptions getExplainOptions() { ? com.google.firestore.v1.ExplainOptions.getDefaultInstance() : explainOptions_; } + /** * * @@ -749,6 +768,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1079,6 +1099,7 @@ public Builder clearConsistencySelector() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -1106,6 +1127,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -1133,6 +1155,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1159,6 +1182,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1181,6 +1205,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -1214,6 +1239,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.StructuredAggregationQuery.Builder, com.google.firestore.v1.StructuredAggregationQueryOrBuilder> structuredAggregationQueryBuilder_; + /** * * @@ -1230,6 +1256,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasStructuredAggregationQuery() { return queryTypeCase_ == 2; } + /** * * @@ -1256,6 +1283,7 @@ public com.google.firestore.v1.StructuredAggregationQuery getStructuredAggregati return com.google.firestore.v1.StructuredAggregationQuery.getDefaultInstance(); } } + /** * * @@ -1280,6 +1308,7 @@ public Builder setStructuredAggregationQuery( queryTypeCase_ = 2; return this; } + /** * * @@ -1301,6 +1330,7 @@ public Builder setStructuredAggregationQuery( queryTypeCase_ = 2; return this; } + /** * * @@ -1336,6 +1366,7 @@ public Builder mergeStructuredAggregationQuery( queryTypeCase_ = 2; return this; } + /** * * @@ -1362,6 +1393,7 @@ public Builder clearStructuredAggregationQuery() { } return this; } + /** * * @@ -1376,6 +1408,7 @@ public Builder clearStructuredAggregationQuery() { getStructuredAggregationQueryBuilder() { return getStructuredAggregationQueryFieldBuilder().getBuilder(); } + /** * * @@ -1398,6 +1431,7 @@ public Builder clearStructuredAggregationQuery() { return com.google.firestore.v1.StructuredAggregationQuery.getDefaultInstance(); } } + /** * * @@ -1448,6 +1482,7 @@ public Builder clearStructuredAggregationQuery() { public boolean hasTransaction() { return consistencySelectorCase_ == 4; } + /** * * @@ -1467,6 +1502,7 @@ public com.google.protobuf.ByteString getTransaction() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1490,6 +1526,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1517,6 +1554,7 @@ public Builder clearTransaction() { com.google.firestore.v1.TransactionOptions.Builder, com.google.firestore.v1.TransactionOptionsOrBuilder> newTransactionBuilder_; + /** * * @@ -1535,6 +1573,7 @@ public Builder clearTransaction() { public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } + /** * * @@ -1563,6 +1602,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } } + /** * * @@ -1588,6 +1628,7 @@ public Builder setNewTransaction(com.google.firestore.v1.TransactionOptions valu consistencySelectorCase_ = 5; return this; } + /** * * @@ -1611,6 +1652,7 @@ public Builder setNewTransaction( consistencySelectorCase_ = 5; return this; } + /** * * @@ -1647,6 +1689,7 @@ public Builder mergeNewTransaction(com.google.firestore.v1.TransactionOptions va consistencySelectorCase_ = 5; return this; } + /** * * @@ -1675,6 +1718,7 @@ public Builder clearNewTransaction() { } return this; } + /** * * @@ -1690,6 +1734,7 @@ public Builder clearNewTransaction() { public com.google.firestore.v1.TransactionOptions.Builder getNewTransactionBuilder() { return getNewTransactionFieldBuilder().getBuilder(); } + /** * * @@ -1713,6 +1758,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } } + /** * * @@ -1754,6 +1800,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1773,6 +1820,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu public boolean hasReadTime() { return consistencySelectorCase_ == 6; } + /** * * @@ -1802,6 +1850,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1828,6 +1877,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 6; return this; } + /** * * @@ -1851,6 +1901,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 6; return this; } + /** * * @@ -1887,6 +1938,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 6; return this; } + /** * * @@ -1916,6 +1968,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -1932,6 +1985,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1956,6 +2010,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1999,6 +2054,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { com.google.firestore.v1.ExplainOptions.Builder, com.google.firestore.v1.ExplainOptionsOrBuilder> explainOptionsBuilder_; + /** * * @@ -2016,6 +2072,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean hasExplainOptions() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2039,6 +2096,7 @@ public com.google.firestore.v1.ExplainOptions getExplainOptions() { return explainOptionsBuilder_.getMessage(); } } + /** * * @@ -2064,6 +2122,7 @@ public Builder setExplainOptions(com.google.firestore.v1.ExplainOptions value) { onChanged(); return this; } + /** * * @@ -2087,6 +2146,7 @@ public Builder setExplainOptions( onChanged(); return this; } + /** * * @@ -2117,6 +2177,7 @@ public Builder mergeExplainOptions(com.google.firestore.v1.ExplainOptions value) } return this; } + /** * * @@ -2139,6 +2200,7 @@ public Builder clearExplainOptions() { onChanged(); return this; } + /** * * @@ -2156,6 +2218,7 @@ public com.google.firestore.v1.ExplainOptions.Builder getExplainOptionsBuilder() onChanged(); return getExplainOptionsFieldBuilder().getBuilder(); } + /** * * @@ -2177,6 +2240,7 @@ public com.google.firestore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilde : explainOptions_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequestOrBuilder.java index 1d2f59681..2fd6900a7 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface RunAggregationQueryRequestOrBuilder @@ -41,6 +41,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -71,6 +72,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return Whether the structuredAggregationQuery field is set. */ boolean hasStructuredAggregationQuery(); + /** * * @@ -83,6 +85,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return The structuredAggregationQuery. */ com.google.firestore.v1.StructuredAggregationQuery getStructuredAggregationQuery(); + /** * * @@ -109,6 +112,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return Whether the transaction field is set. */ boolean hasTransaction(); + /** * * @@ -139,6 +143,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return Whether the newTransaction field is set. */ boolean hasNewTransaction(); + /** * * @@ -154,6 +159,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return The newTransaction. */ com.google.firestore.v1.TransactionOptions getNewTransaction(); + /** * * @@ -184,6 +190,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -200,6 +207,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * @@ -230,6 +238,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return Whether the explainOptions field is set. */ boolean hasExplainOptions(); + /** * * @@ -245,6 +254,7 @@ public interface RunAggregationQueryRequestOrBuilder * @return The explainOptions. */ com.google.firestore.v1.ExplainOptions getExplainOptions(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponse.java index b4c320bbd..9756b2193 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class RunAggregationQueryResponse extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.firestore.v1.RunAggregationQueryResponse) RunAggregationQueryResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use RunAggregationQueryResponse.newBuilder() to construct. private RunAggregationQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int RESULT_FIELD_NUMBER = 1; private com.google.firestore.v1.AggregationResult result_; + /** * * @@ -84,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasResult() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -103,6 +106,7 @@ public com.google.firestore.v1.AggregationResult getResult() { ? com.google.firestore.v1.AggregationResult.getDefaultInstance() : result_; } + /** * * @@ -123,6 +127,7 @@ public com.google.firestore.v1.AggregationResultOrBuilder getResultOrBuilder() { public static final int TRANSACTION_FIELD_NUMBER = 2; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -144,6 +149,7 @@ public com.google.protobuf.ByteString getTransaction() { public static final int READ_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -166,6 +172,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasReadTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -188,6 +195,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -211,6 +219,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public static final int EXPLAIN_METRICS_FIELD_NUMBER = 10; private com.google.firestore.v1.ExplainMetrics explainMetrics_; + /** * * @@ -228,6 +237,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean hasExplainMetrics() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -247,6 +257,7 @@ public com.google.firestore.v1.ExplainMetrics getExplainMetrics() { ? com.google.firestore.v1.ExplainMetrics.getDefaultInstance() : explainMetrics_; } + /** * * @@ -466,6 +477,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -722,6 +734,7 @@ public Builder mergeFrom( com.google.firestore.v1.AggregationResult.Builder, com.google.firestore.v1.AggregationResultOrBuilder> resultBuilder_; + /** * * @@ -738,6 +751,7 @@ public Builder mergeFrom( public boolean hasResult() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -760,6 +774,7 @@ public com.google.firestore.v1.AggregationResult getResult() { return resultBuilder_.getMessage(); } } + /** * * @@ -784,6 +799,7 @@ public Builder setResult(com.google.firestore.v1.AggregationResult value) { onChanged(); return this; } + /** * * @@ -805,6 +821,7 @@ public Builder setResult(com.google.firestore.v1.AggregationResult.Builder build onChanged(); return this; } + /** * * @@ -834,6 +851,7 @@ public Builder mergeResult(com.google.firestore.v1.AggregationResult value) { } return this; } + /** * * @@ -855,6 +873,7 @@ public Builder clearResult() { onChanged(); return this; } + /** * * @@ -871,6 +890,7 @@ public com.google.firestore.v1.AggregationResult.Builder getResultBuilder() { onChanged(); return getResultFieldBuilder().getBuilder(); } + /** * * @@ -891,6 +911,7 @@ public com.google.firestore.v1.AggregationResultOrBuilder getResultOrBuilder() { : result_; } } + /** * * @@ -920,6 +941,7 @@ public com.google.firestore.v1.AggregationResultOrBuilder getResultOrBuilder() { } private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -938,6 +960,7 @@ public com.google.firestore.v1.AggregationResultOrBuilder getResultOrBuilder() { public com.google.protobuf.ByteString getTransaction() { return transaction_; } + /** * * @@ -962,6 +985,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -989,6 +1013,7 @@ public Builder clearTransaction() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1010,6 +1035,7 @@ public Builder clearTransaction() { public boolean hasReadTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1035,6 +1061,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -1064,6 +1091,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1090,6 +1118,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -1124,6 +1153,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1150,6 +1180,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -1171,6 +1202,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1194,6 +1226,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * @@ -1233,6 +1266,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { com.google.firestore.v1.ExplainMetrics.Builder, com.google.firestore.v1.ExplainMetricsOrBuilder> explainMetricsBuilder_; + /** * * @@ -1249,6 +1283,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean hasExplainMetrics() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1271,6 +1306,7 @@ public com.google.firestore.v1.ExplainMetrics getExplainMetrics() { return explainMetricsBuilder_.getMessage(); } } + /** * * @@ -1295,6 +1331,7 @@ public Builder setExplainMetrics(com.google.firestore.v1.ExplainMetrics value) { onChanged(); return this; } + /** * * @@ -1317,6 +1354,7 @@ public Builder setExplainMetrics( onChanged(); return this; } + /** * * @@ -1346,6 +1384,7 @@ public Builder mergeExplainMetrics(com.google.firestore.v1.ExplainMetrics value) } return this; } + /** * * @@ -1367,6 +1406,7 @@ public Builder clearExplainMetrics() { onChanged(); return this; } + /** * * @@ -1383,6 +1423,7 @@ public com.google.firestore.v1.ExplainMetrics.Builder getExplainMetricsBuilder() onChanged(); return getExplainMetricsFieldBuilder().getBuilder(); } + /** * * @@ -1403,6 +1444,7 @@ public com.google.firestore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilde : explainMetrics_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponseOrBuilder.java index 943bb32ba..402f195fe 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunAggregationQueryResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface RunAggregationQueryResponseOrBuilder @@ -38,6 +38,7 @@ public interface RunAggregationQueryResponseOrBuilder * @return Whether the result field is set. */ boolean hasResult(); + /** * * @@ -52,6 +53,7 @@ public interface RunAggregationQueryResponseOrBuilder * @return The result. */ com.google.firestore.v1.AggregationResult getResult(); + /** * * @@ -100,6 +102,7 @@ public interface RunAggregationQueryResponseOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -119,6 +122,7 @@ public interface RunAggregationQueryResponseOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * @@ -151,6 +155,7 @@ public interface RunAggregationQueryResponseOrBuilder * @return Whether the explainMetrics field is set. */ boolean hasExplainMetrics(); + /** * * @@ -165,6 +170,7 @@ public interface RunAggregationQueryResponseOrBuilder * @return The explainMetrics. */ com.google.firestore.v1.ExplainMetrics getExplainMetrics(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java index 7e3c5216d..59132769b 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class RunQueryRequest extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.v1.RunQueryRequest) RunQueryRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use RunQueryRequest.newBuilder() to construct. private RunQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -80,6 +81,7 @@ public enum QueryTypeCase private QueryTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -128,6 +130,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -166,6 +169,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -194,6 +198,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -224,6 +229,7 @@ public com.google.protobuf.ByteString getParentBytes() { } public static final int STRUCTURED_QUERY_FIELD_NUMBER = 2; + /** * * @@ -239,6 +245,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -257,6 +264,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { } return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } + /** * * @@ -275,6 +283,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil } public static final int TRANSACTION_FIELD_NUMBER = 5; + /** * * @@ -292,6 +301,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public boolean hasTransaction() { return consistencySelectorCase_ == 5; } + /** * * @@ -314,6 +324,7 @@ public com.google.protobuf.ByteString getTransaction() { } public static final int NEW_TRANSACTION_FIELD_NUMBER = 6; + /** * * @@ -332,6 +343,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasNewTransaction() { return consistencySelectorCase_ == 6; } + /** * * @@ -353,6 +365,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { } return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } + /** * * @@ -374,6 +387,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu } public static final int READ_TIME_FIELD_NUMBER = 7; + /** * * @@ -393,6 +407,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu public boolean hasReadTime() { return consistencySelectorCase_ == 7; } + /** * * @@ -415,6 +430,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -438,6 +454,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public static final int EXPLAIN_OPTIONS_FIELD_NUMBER = 10; private com.google.firestore.v1.ExplainOptions explainOptions_; + /** * * @@ -456,6 +473,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean hasExplainOptions() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -476,6 +494,7 @@ public com.google.firestore.v1.ExplainOptions getExplainOptions() { ? com.google.firestore.v1.ExplainOptions.getDefaultInstance() : explainOptions_; } + /** * * @@ -745,6 +764,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1072,6 +1092,7 @@ public Builder clearConsistencySelector() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -1099,6 +1120,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -1126,6 +1148,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1152,6 +1175,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1174,6 +1198,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -1207,6 +1232,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.StructuredQuery.Builder, com.google.firestore.v1.StructuredQueryOrBuilder> structuredQueryBuilder_; + /** * * @@ -1222,6 +1248,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -1247,6 +1274,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -1269,6 +1297,7 @@ public Builder setStructuredQuery(com.google.firestore.v1.StructuredQuery value) queryTypeCase_ = 2; return this; } + /** * * @@ -1289,6 +1318,7 @@ public Builder setStructuredQuery( queryTypeCase_ = 2; return this; } + /** * * @@ -1321,6 +1351,7 @@ public Builder mergeStructuredQuery(com.google.firestore.v1.StructuredQuery valu queryTypeCase_ = 2; return this; } + /** * * @@ -1346,6 +1377,7 @@ public Builder clearStructuredQuery() { } return this; } + /** * * @@ -1358,6 +1390,7 @@ public Builder clearStructuredQuery() { public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder() { return getStructuredQueryFieldBuilder().getBuilder(); } + /** * * @@ -1378,6 +1411,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -1427,6 +1461,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public boolean hasTransaction() { return consistencySelectorCase_ == 5; } + /** * * @@ -1446,6 +1481,7 @@ public com.google.protobuf.ByteString getTransaction() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1469,6 +1505,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1496,6 +1533,7 @@ public Builder clearTransaction() { com.google.firestore.v1.TransactionOptions.Builder, com.google.firestore.v1.TransactionOptionsOrBuilder> newTransactionBuilder_; + /** * * @@ -1514,6 +1552,7 @@ public Builder clearTransaction() { public boolean hasNewTransaction() { return consistencySelectorCase_ == 6; } + /** * * @@ -1542,6 +1581,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } } + /** * * @@ -1567,6 +1607,7 @@ public Builder setNewTransaction(com.google.firestore.v1.TransactionOptions valu consistencySelectorCase_ = 6; return this; } + /** * * @@ -1590,6 +1631,7 @@ public Builder setNewTransaction( consistencySelectorCase_ = 6; return this; } + /** * * @@ -1626,6 +1668,7 @@ public Builder mergeNewTransaction(com.google.firestore.v1.TransactionOptions va consistencySelectorCase_ = 6; return this; } + /** * * @@ -1654,6 +1697,7 @@ public Builder clearNewTransaction() { } return this; } + /** * * @@ -1669,6 +1713,7 @@ public Builder clearNewTransaction() { public com.google.firestore.v1.TransactionOptions.Builder getNewTransactionBuilder() { return getNewTransactionFieldBuilder().getBuilder(); } + /** * * @@ -1692,6 +1737,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu return com.google.firestore.v1.TransactionOptions.getDefaultInstance(); } } + /** * * @@ -1733,6 +1779,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1752,6 +1799,7 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu public boolean hasReadTime() { return consistencySelectorCase_ == 7; } + /** * * @@ -1781,6 +1829,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1807,6 +1856,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 7; return this; } + /** * * @@ -1830,6 +1880,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 7; return this; } + /** * * @@ -1866,6 +1917,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 7; return this; } + /** * * @@ -1895,6 +1947,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -1911,6 +1964,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1935,6 +1989,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1978,6 +2033,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { com.google.firestore.v1.ExplainOptions.Builder, com.google.firestore.v1.ExplainOptionsOrBuilder> explainOptionsBuilder_; + /** * * @@ -1995,6 +2051,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public boolean hasExplainOptions() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2018,6 +2075,7 @@ public com.google.firestore.v1.ExplainOptions getExplainOptions() { return explainOptionsBuilder_.getMessage(); } } + /** * * @@ -2043,6 +2101,7 @@ public Builder setExplainOptions(com.google.firestore.v1.ExplainOptions value) { onChanged(); return this; } + /** * * @@ -2066,6 +2125,7 @@ public Builder setExplainOptions( onChanged(); return this; } + /** * * @@ -2096,6 +2156,7 @@ public Builder mergeExplainOptions(com.google.firestore.v1.ExplainOptions value) } return this; } + /** * * @@ -2118,6 +2179,7 @@ public Builder clearExplainOptions() { onChanged(); return this; } + /** * * @@ -2135,6 +2197,7 @@ public com.google.firestore.v1.ExplainOptions.Builder getExplainOptionsBuilder() onChanged(); return getExplainOptionsFieldBuilder().getBuilder(); } + /** * * @@ -2156,6 +2219,7 @@ public com.google.firestore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilde : explainOptions_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java index 7e630277f..7808c8645 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface RunQueryRequestOrBuilder @@ -41,6 +41,7 @@ public interface RunQueryRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -71,6 +72,7 @@ public interface RunQueryRequestOrBuilder * @return Whether the structuredQuery field is set. */ boolean hasStructuredQuery(); + /** * * @@ -83,6 +85,7 @@ public interface RunQueryRequestOrBuilder * @return The structuredQuery. */ com.google.firestore.v1.StructuredQuery getStructuredQuery(); + /** * * @@ -108,6 +111,7 @@ public interface RunQueryRequestOrBuilder * @return Whether the transaction field is set. */ boolean hasTransaction(); + /** * * @@ -138,6 +142,7 @@ public interface RunQueryRequestOrBuilder * @return Whether the newTransaction field is set. */ boolean hasNewTransaction(); + /** * * @@ -153,6 +158,7 @@ public interface RunQueryRequestOrBuilder * @return The newTransaction. */ com.google.firestore.v1.TransactionOptions getNewTransaction(); + /** * * @@ -183,6 +189,7 @@ public interface RunQueryRequestOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -199,6 +206,7 @@ public interface RunQueryRequestOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * @@ -229,6 +237,7 @@ public interface RunQueryRequestOrBuilder * @return Whether the explainOptions field is set. */ boolean hasExplainOptions(); + /** * * @@ -244,6 +253,7 @@ public interface RunQueryRequestOrBuilder * @return The explainOptions. */ com.google.firestore.v1.ExplainOptions getExplainOptions(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java index a4bdf1daa..fe6a587ee 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class RunQueryResponse extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.firestore.v1.RunQueryResponse) RunQueryResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use RunQueryResponse.newBuilder() to construct. private RunQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public enum ContinuationSelectorCase private ContinuationSelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -113,6 +115,7 @@ public ContinuationSelectorCase getContinuationSelectorCase() { public static final int TRANSACTION_FIELD_NUMBER = 2; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -135,6 +138,7 @@ public com.google.protobuf.ByteString getTransaction() { public static final int DOCUMENT_FIELD_NUMBER = 1; private com.google.firestore.v1.Document document_; + /** * * @@ -150,6 +154,7 @@ public com.google.protobuf.ByteString getTransaction() { public boolean hasDocument() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -165,6 +170,7 @@ public boolean hasDocument() { public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } + /** * * @@ -181,6 +187,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public static final int READ_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -202,6 +209,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public boolean hasReadTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -223,6 +231,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -245,6 +254,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public static final int SKIPPED_RESULTS_FIELD_NUMBER = 4; private int skippedResults_ = 0; + /** * * @@ -263,6 +273,7 @@ public int getSkippedResults() { } public static final int DONE_FIELD_NUMBER = 6; + /** * * @@ -279,6 +290,7 @@ public int getSkippedResults() { public boolean hasDone() { return continuationSelectorCase_ == 6; } + /** * * @@ -301,6 +313,7 @@ public boolean getDone() { public static final int EXPLAIN_METRICS_FIELD_NUMBER = 11; private com.google.firestore.v1.ExplainMetrics explainMetrics_; + /** * * @@ -318,6 +331,7 @@ public boolean getDone() { public boolean hasExplainMetrics() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -337,6 +351,7 @@ public com.google.firestore.v1.ExplainMetrics getExplainMetrics() { ? com.google.firestore.v1.ExplainMetrics.getDefaultInstance() : explainMetrics_; } + /** * * @@ -588,6 +603,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -890,6 +906,7 @@ public Builder clearContinuationSelector() { private int bitField0_; private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -909,6 +926,7 @@ public Builder clearContinuationSelector() { public com.google.protobuf.ByteString getTransaction() { return transaction_; } + /** * * @@ -934,6 +952,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -962,6 +981,7 @@ public Builder clearTransaction() { com.google.firestore.v1.Document.Builder, com.google.firestore.v1.DocumentOrBuilder> documentBuilder_; + /** * * @@ -976,6 +996,7 @@ public Builder clearTransaction() { public boolean hasDocument() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -996,6 +1017,7 @@ public com.google.firestore.v1.Document getDocument() { return documentBuilder_.getMessage(); } } + /** * * @@ -1018,6 +1040,7 @@ public Builder setDocument(com.google.firestore.v1.Document value) { onChanged(); return this; } + /** * * @@ -1037,6 +1060,7 @@ public Builder setDocument(com.google.firestore.v1.Document.Builder builderForVa onChanged(); return this; } + /** * * @@ -1064,6 +1088,7 @@ public Builder mergeDocument(com.google.firestore.v1.Document value) { } return this; } + /** * * @@ -1083,6 +1108,7 @@ public Builder clearDocument() { onChanged(); return this; } + /** * * @@ -1097,6 +1123,7 @@ public com.google.firestore.v1.Document.Builder getDocumentBuilder() { onChanged(); return getDocumentFieldBuilder().getBuilder(); } + /** * * @@ -1115,6 +1142,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { : document_; } } + /** * * @@ -1147,6 +1175,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1167,6 +1196,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public boolean hasReadTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1191,6 +1221,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -1219,6 +1250,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1244,6 +1276,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -1277,6 +1310,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1302,6 +1336,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -1322,6 +1357,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1344,6 +1380,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * @@ -1377,6 +1414,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { } private int skippedResults_; + /** * * @@ -1393,6 +1431,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public int getSkippedResults() { return skippedResults_; } + /** * * @@ -1413,6 +1452,7 @@ public Builder setSkippedResults(int value) { onChanged(); return this; } + /** * * @@ -1447,6 +1487,7 @@ public Builder clearSkippedResults() { public boolean hasDone() { return continuationSelectorCase_ == 6; } + /** * * @@ -1465,6 +1506,7 @@ public boolean getDone() { } return false; } + /** * * @@ -1485,6 +1527,7 @@ public Builder setDone(boolean value) { onChanged(); return this; } + /** * * @@ -1512,6 +1555,7 @@ public Builder clearDone() { com.google.firestore.v1.ExplainMetrics.Builder, com.google.firestore.v1.ExplainMetricsOrBuilder> explainMetricsBuilder_; + /** * * @@ -1528,6 +1572,7 @@ public Builder clearDone() { public boolean hasExplainMetrics() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -1550,6 +1595,7 @@ public com.google.firestore.v1.ExplainMetrics getExplainMetrics() { return explainMetricsBuilder_.getMessage(); } } + /** * * @@ -1574,6 +1620,7 @@ public Builder setExplainMetrics(com.google.firestore.v1.ExplainMetrics value) { onChanged(); return this; } + /** * * @@ -1596,6 +1643,7 @@ public Builder setExplainMetrics( onChanged(); return this; } + /** * * @@ -1625,6 +1673,7 @@ public Builder mergeExplainMetrics(com.google.firestore.v1.ExplainMetrics value) } return this; } + /** * * @@ -1646,6 +1695,7 @@ public Builder clearExplainMetrics() { onChanged(); return this; } + /** * * @@ -1662,6 +1712,7 @@ public com.google.firestore.v1.ExplainMetrics.Builder getExplainMetricsBuilder() onChanged(); return getExplainMetricsFieldBuilder().getBuilder(); } + /** * * @@ -1682,6 +1733,7 @@ public com.google.firestore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilde : explainMetrics_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java index b69f76b1f..6fe3162c0 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface RunQueryResponseOrBuilder @@ -53,6 +53,7 @@ public interface RunQueryResponseOrBuilder * @return Whether the document field is set. */ boolean hasDocument(); + /** * * @@ -65,6 +66,7 @@ public interface RunQueryResponseOrBuilder * @return The document. */ com.google.firestore.v1.Document getDocument(); + /** * * @@ -94,6 +96,7 @@ public interface RunQueryResponseOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -112,6 +115,7 @@ public interface RunQueryResponseOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * @@ -156,6 +160,7 @@ public interface RunQueryResponseOrBuilder * @return Whether the done field is set. */ boolean hasDone(); + /** * * @@ -184,6 +189,7 @@ public interface RunQueryResponseOrBuilder * @return Whether the explainMetrics field is set. */ boolean hasExplainMetrics(); + /** * * @@ -198,6 +204,7 @@ public interface RunQueryResponseOrBuilder * @return The explainMetrics. */ com.google.firestore.v1.ExplainMetrics getExplainMetrics(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQuery.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQuery.java index 1106e4341..f438736cf 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQuery.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQuery.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class StructuredAggregationQuery extends com.google.protobuf.Genera // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredAggregationQuery) StructuredAggregationQueryOrBuilder { private static final long serialVersionUID = 0L; + // Use StructuredAggregationQuery.newBuilder() to construct. private StructuredAggregationQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public interface AggregationOrBuilder * @return Whether the count field is set. */ boolean hasCount(); + /** * * @@ -93,6 +95,7 @@ public interface AggregationOrBuilder * @return The count. */ com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count getCount(); + /** * * @@ -117,6 +120,7 @@ public interface AggregationOrBuilder * @return Whether the sum field is set. */ boolean hasSum(); + /** * * @@ -129,6 +133,7 @@ public interface AggregationOrBuilder * @return The sum. */ com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum getSum(); + /** * * @@ -152,6 +157,7 @@ public interface AggregationOrBuilder * @return Whether the avg field is set. */ boolean hasAvg(); + /** * * @@ -164,6 +170,7 @@ public interface AggregationOrBuilder * @return The avg. */ com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg getAvg(); + /** * * @@ -221,6 +228,7 @@ public interface AggregationOrBuilder * @return The alias. */ java.lang.String getAlias(); + /** * * @@ -270,6 +278,7 @@ public interface AggregationOrBuilder com.google.firestore.v1.StructuredAggregationQuery.Aggregation.OperatorCase getOperatorCase(); } + /** * * @@ -284,6 +293,7 @@ public static final class Aggregation extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredAggregationQuery.Aggregation) AggregationOrBuilder { private static final long serialVersionUID = 0L; + // Use Aggregation.newBuilder() to construct. private Aggregation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -348,6 +358,7 @@ public interface CountOrBuilder * @return Whether the upTo field is set. */ boolean hasUpTo(); + /** * * @@ -377,6 +388,7 @@ public interface CountOrBuilder * @return The upTo. */ com.google.protobuf.Int64Value getUpTo(); + /** * * @@ -405,6 +417,7 @@ public interface CountOrBuilder */ com.google.protobuf.Int64ValueOrBuilder getUpToOrBuilder(); } + /** * * @@ -422,6 +435,7 @@ public static final class Count extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredAggregationQuery.Aggregation.Count) CountOrBuilder { private static final long serialVersionUID = 0L; + // Use Count.newBuilder() to construct. private Count(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -453,6 +467,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int UP_TO_FIELD_NUMBER = 1; private com.google.protobuf.Int64Value upTo_; + /** * * @@ -485,6 +500,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasUpTo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -517,6 +533,7 @@ public boolean hasUpTo() { public com.google.protobuf.Int64Value getUpTo() { return upTo_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : upTo_; } + /** * * @@ -717,6 +734,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -936,6 +954,7 @@ public Builder mergeFrom( com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> upToBuilder_; + /** * * @@ -967,6 +986,7 @@ public Builder mergeFrom( public boolean hasUpTo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1002,6 +1022,7 @@ public com.google.protobuf.Int64Value getUpTo() { return upToBuilder_.getMessage(); } } + /** * * @@ -1041,6 +1062,7 @@ public Builder setUpTo(com.google.protobuf.Int64Value value) { onChanged(); return this; } + /** * * @@ -1077,6 +1099,7 @@ public Builder setUpTo(com.google.protobuf.Int64Value.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -1121,6 +1144,7 @@ public Builder mergeUpTo(com.google.protobuf.Int64Value value) { } return this; } + /** * * @@ -1157,6 +1181,7 @@ public Builder clearUpTo() { onChanged(); return this; } + /** * * @@ -1188,6 +1213,7 @@ public com.google.protobuf.Int64Value.Builder getUpToBuilder() { onChanged(); return getUpToFieldBuilder().getBuilder(); } + /** * * @@ -1221,6 +1247,7 @@ public com.google.protobuf.Int64ValueOrBuilder getUpToOrBuilder() { return upTo_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : upTo_; } } + /** * * @@ -1349,6 +1376,7 @@ public interface SumOrBuilder * @return Whether the field field is set. */ boolean hasField(); + /** * * @@ -1361,6 +1389,7 @@ public interface SumOrBuilder * @return The field. */ com.google.firestore.v1.StructuredQuery.FieldReference getField(); + /** * * @@ -1372,6 +1401,7 @@ public interface SumOrBuilder */ com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); } + /** * * @@ -1406,6 +1436,7 @@ public static final class Sum extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum) SumOrBuilder { private static final long serialVersionUID = 0L; + // Use Sum.newBuilder() to construct. private Sum(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1437,6 +1468,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int FIELD_FIELD_NUMBER = 1; private com.google.firestore.v1.StructuredQuery.FieldReference field_; + /** * * @@ -1452,6 +1484,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1469,6 +1502,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() : field_; } + /** * * @@ -1653,6 +1687,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1887,6 +1922,7 @@ public Builder mergeFrom( com.google.firestore.v1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> fieldBuilder_; + /** * * @@ -1901,6 +1937,7 @@ public Builder mergeFrom( public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1921,6 +1958,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { return fieldBuilder_.getMessage(); } } + /** * * @@ -1943,6 +1981,7 @@ public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference v onChanged(); return this; } + /** * * @@ -1963,6 +2002,7 @@ public Builder setField( onChanged(); return this; } + /** * * @@ -1992,6 +2032,7 @@ public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference } return this; } + /** * * @@ -2011,6 +2052,7 @@ public Builder clearField() { onChanged(); return this; } + /** * * @@ -2025,6 +2067,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBu onChanged(); return getFieldFieldBuilder().getBuilder(); } + /** * * @@ -2043,6 +2086,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO : field_; } } + /** * * @@ -2153,6 +2197,7 @@ public interface AvgOrBuilder * @return Whether the field field is set. */ boolean hasField(); + /** * * @@ -2165,6 +2210,7 @@ public interface AvgOrBuilder * @return The field. */ com.google.firestore.v1.StructuredQuery.FieldReference getField(); + /** * * @@ -2176,6 +2222,7 @@ public interface AvgOrBuilder */ com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); } + /** * * @@ -2200,6 +2247,7 @@ public static final class Avg extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg) AvgOrBuilder { private static final long serialVersionUID = 0L; + // Use Avg.newBuilder() to construct. private Avg(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2231,6 +2279,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int FIELD_FIELD_NUMBER = 1; private com.google.firestore.v1.StructuredQuery.FieldReference field_; + /** * * @@ -2246,6 +2295,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2263,6 +2313,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() : field_; } + /** * * @@ -2447,6 +2498,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -2671,6 +2723,7 @@ public Builder mergeFrom( com.google.firestore.v1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> fieldBuilder_; + /** * * @@ -2685,6 +2738,7 @@ public Builder mergeFrom( public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2705,6 +2759,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { return fieldBuilder_.getMessage(); } } + /** * * @@ -2727,6 +2782,7 @@ public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference v onChanged(); return this; } + /** * * @@ -2747,6 +2803,7 @@ public Builder setField( onChanged(); return this; } + /** * * @@ -2776,6 +2833,7 @@ public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference } return this; } + /** * * @@ -2795,6 +2853,7 @@ public Builder clearField() { onChanged(); return this; } + /** * * @@ -2809,6 +2868,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBu onChanged(); return getFieldFieldBuilder().getBuilder(); } + /** * * @@ -2827,6 +2887,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO : field_; } } + /** * * @@ -2938,6 +2999,7 @@ public enum OperatorCase private OperatorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2973,6 +3035,7 @@ public OperatorCase getOperatorCase() { } public static final int COUNT_FIELD_NUMBER = 1; + /** * * @@ -2988,6 +3051,7 @@ public OperatorCase getOperatorCase() { public boolean hasCount() { return operatorCase_ == 1; } + /** * * @@ -3007,6 +3071,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count getC return com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count .getDefaultInstance(); } + /** * * @@ -3027,6 +3092,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count getC } public static final int SUM_FIELD_NUMBER = 2; + /** * * @@ -3042,6 +3108,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count getC public boolean hasSum() { return operatorCase_ == 2; } + /** * * @@ -3061,6 +3128,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum getSum return com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum .getDefaultInstance(); } + /** * * @@ -3081,6 +3149,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum getSum } public static final int AVG_FIELD_NUMBER = 3; + /** * * @@ -3096,6 +3165,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum getSum public boolean hasAvg() { return operatorCase_ == 3; } + /** * * @@ -3115,6 +3185,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg getAvg return com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg .getDefaultInstance(); } + /** * * @@ -3138,6 +3209,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg getAvg @SuppressWarnings("serial") private volatile java.lang.Object alias_ = ""; + /** * * @@ -3195,6 +3267,7 @@ public java.lang.String getAlias() { return s; } } + /** * * @@ -3472,6 +3545,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -3747,6 +3821,7 @@ public Builder clearOperator() { com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.Builder, com.google.firestore.v1.StructuredAggregationQuery.Aggregation.CountOrBuilder> countBuilder_; + /** * * @@ -3762,6 +3837,7 @@ public Builder clearOperator() { public boolean hasCount() { return operatorCase_ == 1; } + /** * * @@ -3789,6 +3865,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count getC .getDefaultInstance(); } } + /** * * @@ -3812,6 +3889,7 @@ public Builder setCount( operatorCase_ = 1; return this; } + /** * * @@ -3833,6 +3911,7 @@ public Builder setCount( operatorCase_ = 1; return this; } + /** * * @@ -3869,6 +3948,7 @@ public Builder mergeCount( operatorCase_ = 1; return this; } + /** * * @@ -3894,6 +3974,7 @@ public Builder clearCount() { } return this; } + /** * * @@ -3907,6 +3988,7 @@ public Builder clearCount() { getCountBuilder() { return getCountFieldBuilder().getBuilder(); } + /** * * @@ -3929,6 +4011,7 @@ public Builder clearCount() { .getDefaultInstance(); } } + /** * * @@ -3969,6 +4052,7 @@ public Builder clearCount() { com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.Builder, com.google.firestore.v1.StructuredAggregationQuery.Aggregation.SumOrBuilder> sumBuilder_; + /** * * @@ -3984,6 +4068,7 @@ public Builder clearCount() { public boolean hasSum() { return operatorCase_ == 2; } + /** * * @@ -4011,6 +4096,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum getSum .getDefaultInstance(); } } + /** * * @@ -4034,6 +4120,7 @@ public Builder setSum( operatorCase_ = 2; return this; } + /** * * @@ -4055,6 +4142,7 @@ public Builder setSum( operatorCase_ = 2; return this; } + /** * * @@ -4091,6 +4179,7 @@ public Builder mergeSum( operatorCase_ = 2; return this; } + /** * * @@ -4116,6 +4205,7 @@ public Builder clearSum() { } return this; } + /** * * @@ -4129,6 +4219,7 @@ public Builder clearSum() { getSumBuilder() { return getSumFieldBuilder().getBuilder(); } + /** * * @@ -4151,6 +4242,7 @@ public Builder clearSum() { .getDefaultInstance(); } } + /** * * @@ -4191,6 +4283,7 @@ public Builder clearSum() { com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.Builder, com.google.firestore.v1.StructuredAggregationQuery.Aggregation.AvgOrBuilder> avgBuilder_; + /** * * @@ -4206,6 +4299,7 @@ public Builder clearSum() { public boolean hasAvg() { return operatorCase_ == 3; } + /** * * @@ -4233,6 +4327,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg getAvg .getDefaultInstance(); } } + /** * * @@ -4256,6 +4351,7 @@ public Builder setAvg( operatorCase_ = 3; return this; } + /** * * @@ -4277,6 +4373,7 @@ public Builder setAvg( operatorCase_ = 3; return this; } + /** * * @@ -4313,6 +4410,7 @@ public Builder mergeAvg( operatorCase_ = 3; return this; } + /** * * @@ -4338,6 +4436,7 @@ public Builder clearAvg() { } return this; } + /** * * @@ -4351,6 +4450,7 @@ public Builder clearAvg() { getAvgBuilder() { return getAvgFieldBuilder().getBuilder(); } + /** * * @@ -4373,6 +4473,7 @@ public Builder clearAvg() { .getDefaultInstance(); } } + /** * * @@ -4409,6 +4510,7 @@ public Builder clearAvg() { } private java.lang.Object alias_ = ""; + /** * * @@ -4465,6 +4567,7 @@ public java.lang.String getAlias() { return (java.lang.String) ref; } } + /** * * @@ -4521,6 +4624,7 @@ public com.google.protobuf.ByteString getAliasBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4576,6 +4680,7 @@ public Builder setAlias(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4627,6 +4732,7 @@ public Builder clearAlias() { onChanged(); return this; } + /** * * @@ -4767,6 +4873,7 @@ public enum QueryTypeCase private QueryTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -4798,6 +4905,7 @@ public QueryTypeCase getQueryTypeCase() { } public static final int STRUCTURED_QUERY_FIELD_NUMBER = 1; + /** * * @@ -4813,6 +4921,7 @@ public QueryTypeCase getQueryTypeCase() { public boolean hasStructuredQuery() { return queryTypeCase_ == 1; } + /** * * @@ -4831,6 +4940,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { } return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } + /** * * @@ -4853,6 +4963,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil @SuppressWarnings("serial") private java.util.List aggregations_; + /** * * @@ -4874,6 +4985,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil getAggregationsList() { return aggregations_; } + /** * * @@ -4896,6 +5008,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil getAggregationsOrBuilderList() { return aggregations_; } + /** * * @@ -4916,6 +5029,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil public int getAggregationsCount() { return aggregations_.size(); } + /** * * @@ -4936,6 +5050,7 @@ public int getAggregationsCount() { public com.google.firestore.v1.StructuredAggregationQuery.Aggregation getAggregations(int index) { return aggregations_.get(index); } + /** * * @@ -5143,6 +5258,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -5424,6 +5540,7 @@ public Builder clearQueryType() { com.google.firestore.v1.StructuredQuery.Builder, com.google.firestore.v1.StructuredQueryOrBuilder> structuredQueryBuilder_; + /** * * @@ -5439,6 +5556,7 @@ public Builder clearQueryType() { public boolean hasStructuredQuery() { return queryTypeCase_ == 1; } + /** * * @@ -5464,6 +5582,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -5486,6 +5605,7 @@ public Builder setStructuredQuery(com.google.firestore.v1.StructuredQuery value) queryTypeCase_ = 1; return this; } + /** * * @@ -5506,6 +5626,7 @@ public Builder setStructuredQuery( queryTypeCase_ = 1; return this; } + /** * * @@ -5538,6 +5659,7 @@ public Builder mergeStructuredQuery(com.google.firestore.v1.StructuredQuery valu queryTypeCase_ = 1; return this; } + /** * * @@ -5563,6 +5685,7 @@ public Builder clearStructuredQuery() { } return this; } + /** * * @@ -5575,6 +5698,7 @@ public Builder clearStructuredQuery() { public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder() { return getStructuredQueryFieldBuilder().getBuilder(); } + /** * * @@ -5595,6 +5719,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -5670,6 +5795,7 @@ private void ensureAggregationsIsMutable() { return aggregationsBuilder_.getMessageList(); } } + /** * * @@ -5693,6 +5819,7 @@ public int getAggregationsCount() { return aggregationsBuilder_.getCount(); } } + /** * * @@ -5717,6 +5844,7 @@ public com.google.firestore.v1.StructuredAggregationQuery.Aggregation getAggrega return aggregationsBuilder_.getMessage(index); } } + /** * * @@ -5747,6 +5875,7 @@ public Builder setAggregations( } return this; } + /** * * @@ -5775,6 +5904,7 @@ public Builder setAggregations( } return this; } + /** * * @@ -5805,6 +5935,7 @@ public Builder addAggregations( } return this; } + /** * * @@ -5835,6 +5966,7 @@ public Builder addAggregations( } return this; } + /** * * @@ -5862,6 +5994,7 @@ public Builder addAggregations( } return this; } + /** * * @@ -5890,6 +6023,7 @@ public Builder addAggregations( } return this; } + /** * * @@ -5918,6 +6052,7 @@ public Builder addAllAggregations( } return this; } + /** * * @@ -5944,6 +6079,7 @@ public Builder clearAggregations() { } return this; } + /** * * @@ -5970,6 +6106,7 @@ public Builder removeAggregations(int index) { } return this; } + /** * * @@ -5990,6 +6127,7 @@ public Builder removeAggregations(int index) { getAggregationsBuilder(int index) { return getAggregationsFieldBuilder().getBuilder(index); } + /** * * @@ -6014,6 +6152,7 @@ public Builder removeAggregations(int index) { return aggregationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -6039,6 +6178,7 @@ public Builder removeAggregations(int index) { return java.util.Collections.unmodifiableList(aggregations_); } } + /** * * @@ -6061,6 +6201,7 @@ public Builder removeAggregations(int index) { .addBuilder( com.google.firestore.v1.StructuredAggregationQuery.Aggregation.getDefaultInstance()); } + /** * * @@ -6084,6 +6225,7 @@ public Builder removeAggregations(int index) { index, com.google.firestore.v1.StructuredAggregationQuery.Aggregation.getDefaultInstance()); } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQueryOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQueryOrBuilder.java index d54a16da2..ad36a0827 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQueryOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredAggregationQueryOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface StructuredAggregationQueryOrBuilder @@ -36,6 +36,7 @@ public interface StructuredAggregationQueryOrBuilder * @return Whether the structuredQuery field is set. */ boolean hasStructuredQuery(); + /** * * @@ -48,6 +49,7 @@ public interface StructuredAggregationQueryOrBuilder * @return The structuredQuery. */ com.google.firestore.v1.StructuredQuery getStructuredQuery(); + /** * * @@ -77,6 +79,7 @@ public interface StructuredAggregationQueryOrBuilder */ java.util.List getAggregationsList(); + /** * * @@ -94,6 +97,7 @@ public interface StructuredAggregationQueryOrBuilder * */ com.google.firestore.v1.StructuredAggregationQuery.Aggregation getAggregations(int index); + /** * * @@ -111,6 +115,7 @@ public interface StructuredAggregationQueryOrBuilder * */ int getAggregationsCount(); + /** * * @@ -129,6 +134,7 @@ public interface StructuredAggregationQueryOrBuilder */ java.util.List getAggregationsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredPipeline.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredPipeline.java new file mode 100644 index 000000000..3bff4402e --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredPipeline.java @@ -0,0 +1,1195 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/pipeline.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +/** + * + * + *
+ * A Firestore query represented as an ordered list of operations / stages.
+ *
+ * This is considered the top-level function which plans & executes a query.
+ * It is logically equivalent to `query(stages, options)`, but prevents the
+ * client from having to build a function wrapper.
+ * 
+ * + * Protobuf type {@code google.firestore.v1.StructuredPipeline} + */ +public final class StructuredPipeline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredPipeline) + StructuredPipelineOrBuilder { + private static final long serialVersionUID = 0L; + + // Use StructuredPipeline.newBuilder() to construct. + private StructuredPipeline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StructuredPipeline() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StructuredPipeline(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.PipelineProto + .internal_static_google_firestore_v1_StructuredPipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.PipelineProto + .internal_static_google_firestore_v1_StructuredPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.StructuredPipeline.class, + com.google.firestore.v1.StructuredPipeline.Builder.class); + } + + private int bitField0_; + public static final int PIPELINE_FIELD_NUMBER = 1; + private com.google.firestore.v1.Pipeline pipeline_; + + /** + * + * + *
+   * Required. The pipeline query to execute.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pipeline field is set. + */ + @java.lang.Override + public boolean hasPipeline() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The pipeline query to execute.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pipeline. + */ + @java.lang.Override + public com.google.firestore.v1.Pipeline getPipeline() { + return pipeline_ == null ? com.google.firestore.v1.Pipeline.getDefaultInstance() : pipeline_; + } + + /** + * + * + *
+   * Required. The pipeline query to execute.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.firestore.v1.PipelineOrBuilder getPipelineOrBuilder() { + return pipeline_ == null ? com.google.firestore.v1.Pipeline.getDefaultInstance() : pipeline_; + } + + public static final int OPTIONS_FIELD_NUMBER = 2; + + private static final class OptionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.firestore.v1.PipelineProto + .internal_static_google_firestore_v1_StructuredPipeline_OptionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.firestore.v1.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField options_; + + private com.google.protobuf.MapField + internalGetOptions() { + if (options_ == null) { + return com.google.protobuf.MapField.emptyMapField(OptionsDefaultEntryHolder.defaultEntry); + } + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().getMap().size(); + } + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOptions().getMap().containsKey(key); + } + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getMap(); + } + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPipeline()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetOptions(), OptionsDefaultEntryHolder.defaultEntry, 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPipeline()); + } + for (java.util.Map.Entry entry : + internalGetOptions().getMap().entrySet()) { + com.google.protobuf.MapEntry options__ = + OptionsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, options__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.StructuredPipeline)) { + return super.equals(obj); + } + com.google.firestore.v1.StructuredPipeline other = + (com.google.firestore.v1.StructuredPipeline) obj; + + if (hasPipeline() != other.hasPipeline()) return false; + if (hasPipeline()) { + if (!getPipeline().equals(other.getPipeline())) return false; + } + if (!internalGetOptions().equals(other.internalGetOptions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPipeline()) { + hash = (37 * hash) + PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getPipeline().hashCode(); + } + if (!internalGetOptions().getMap().isEmpty()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredPipeline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.StructuredPipeline parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.StructuredPipeline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.StructuredPipeline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A Firestore query represented as an ordered list of operations / stages.
+   *
+   * This is considered the top-level function which plans & executes a query.
+   * It is logically equivalent to `query(stages, options)`, but prevents the
+   * client from having to build a function wrapper.
+   * 
+ * + * Protobuf type {@code google.firestore.v1.StructuredPipeline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredPipeline) + com.google.firestore.v1.StructuredPipelineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.PipelineProto + .internal_static_google_firestore_v1_StructuredPipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.PipelineProto + .internal_static_google_firestore_v1_StructuredPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.StructuredPipeline.class, + com.google.firestore.v1.StructuredPipeline.Builder.class); + } + + // Construct using com.google.firestore.v1.StructuredPipeline.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPipelineFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pipeline_ = null; + if (pipelineBuilder_ != null) { + pipelineBuilder_.dispose(); + pipelineBuilder_ = null; + } + internalGetMutableOptions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.PipelineProto + .internal_static_google_firestore_v1_StructuredPipeline_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.StructuredPipeline getDefaultInstanceForType() { + return com.google.firestore.v1.StructuredPipeline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.StructuredPipeline build() { + com.google.firestore.v1.StructuredPipeline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.StructuredPipeline buildPartial() { + com.google.firestore.v1.StructuredPipeline result = + new com.google.firestore.v1.StructuredPipeline(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.v1.StructuredPipeline result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pipeline_ = pipelineBuilder_ == null ? pipeline_ : pipelineBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.options_ = internalGetOptions().build(OptionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.StructuredPipeline) { + return mergeFrom((com.google.firestore.v1.StructuredPipeline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.StructuredPipeline other) { + if (other == com.google.firestore.v1.StructuredPipeline.getDefaultInstance()) return this; + if (other.hasPipeline()) { + mergePipeline(other.getPipeline()); + } + internalGetMutableOptions().mergeFrom(other.internalGetOptions()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPipelineFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry + options__ = + input.readMessage( + OptionsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableOptions() + .ensureBuilderMap() + .put(options__.getKey(), options__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.firestore.v1.Pipeline pipeline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Pipeline, + com.google.firestore.v1.Pipeline.Builder, + com.google.firestore.v1.PipelineOrBuilder> + pipelineBuilder_; + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pipeline field is set. + */ + public boolean hasPipeline() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pipeline. + */ + public com.google.firestore.v1.Pipeline getPipeline() { + if (pipelineBuilder_ == null) { + return pipeline_ == null + ? com.google.firestore.v1.Pipeline.getDefaultInstance() + : pipeline_; + } else { + return pipelineBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPipeline(com.google.firestore.v1.Pipeline value) { + if (pipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pipeline_ = value; + } else { + pipelineBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPipeline(com.google.firestore.v1.Pipeline.Builder builderForValue) { + if (pipelineBuilder_ == null) { + pipeline_ = builderForValue.build(); + } else { + pipelineBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePipeline(com.google.firestore.v1.Pipeline value) { + if (pipelineBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && pipeline_ != null + && pipeline_ != com.google.firestore.v1.Pipeline.getDefaultInstance()) { + getPipelineBuilder().mergeFrom(value); + } else { + pipeline_ = value; + } + } else { + pipelineBuilder_.mergeFrom(value); + } + if (pipeline_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPipeline() { + bitField0_ = (bitField0_ & ~0x00000001); + pipeline_ = null; + if (pipelineBuilder_ != null) { + pipelineBuilder_.dispose(); + pipelineBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.v1.Pipeline.Builder getPipelineBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPipelineFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.firestore.v1.PipelineOrBuilder getPipelineOrBuilder() { + if (pipelineBuilder_ != null) { + return pipelineBuilder_.getMessageOrBuilder(); + } else { + return pipeline_ == null + ? com.google.firestore.v1.Pipeline.getDefaultInstance() + : pipeline_; + } + } + + /** + * + * + *
+     * Required. The pipeline query to execute.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Pipeline, + com.google.firestore.v1.Pipeline.Builder, + com.google.firestore.v1.PipelineOrBuilder> + getPipelineFieldBuilder() { + if (pipelineBuilder_ == null) { + pipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Pipeline, + com.google.firestore.v1.Pipeline.Builder, + com.google.firestore.v1.PipelineOrBuilder>( + getPipeline(), getParentForChildren(), isClean()); + pipeline_ = null; + } + return pipelineBuilder_; + } + + private static final class OptionsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value> { + @java.lang.Override + public com.google.firestore.v1.Value build(com.google.firestore.v1.ValueOrBuilder val) { + if (val instanceof com.google.firestore.v1.Value) { + return (com.google.firestore.v1.Value) val; + } + return ((com.google.firestore.v1.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return OptionsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final OptionsConverter optionsConverter = new OptionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + options_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + internalGetOptions() { + if (options_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(optionsConverter); + } + return options_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.firestore.v1.ValueOrBuilder, + com.google.firestore.v1.Value, + com.google.firestore.v1.Value.Builder> + internalGetMutableOptions() { + if (options_ == null) { + options_ = new com.google.protobuf.MapFieldBuilder<>(optionsConverter); + } + bitField0_ |= 0x00000002; + onChanged(); + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOptions().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getImmutableMap(); + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableOptions().ensureBuilderMap(); + return map.containsKey(key) ? optionsConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableOptions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return optionsConverter.build(map.get(key)); + } + + public Builder clearOptions() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableOptions().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeOptions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableOptions().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableOptions() { + bitField0_ |= 0x00000002; + return internalGetMutableOptions().ensureMessageMap(); + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putOptions(java.lang.String key, com.google.firestore.v1.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableOptions().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllOptions( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableOptions().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + /** + * + * + *
+     * Optional. Optional query-level arguments.
+     * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.firestore.v1.Value.Builder putOptionsBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableOptions().ensureBuilderMap(); + com.google.firestore.v1.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.firestore.v1.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.firestore.v1.Value) { + entry = ((com.google.firestore.v1.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.firestore.v1.Value.Builder) entry; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredPipeline) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredPipeline) + private static final com.google.firestore.v1.StructuredPipeline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredPipeline(); + } + + public static com.google.firestore.v1.StructuredPipeline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StructuredPipeline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.StructuredPipeline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredPipelineOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredPipelineOrBuilder.java new file mode 100644 index 000000000..39c3f8fcd --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredPipelineOrBuilder.java @@ -0,0 +1,139 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/pipeline.proto + +// Protobuf Java Version: 3.25.7 +package com.google.firestore.v1; + +public interface StructuredPipelineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredPipeline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The pipeline query to execute.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pipeline field is set. + */ + boolean hasPipeline(); + + /** + * + * + *
+   * Required. The pipeline query to execute.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pipeline. + */ + com.google.firestore.v1.Pipeline getPipeline(); + + /** + * + * + *
+   * Required. The pipeline query to execute.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.firestore.v1.PipelineOrBuilder getPipelineOrBuilder(); + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getOptionsCount(); + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsOptions(java.lang.String key); + + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOptions(); + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getOptionsMap(); + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.firestore.v1.Value getOptionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.firestore.v1.Value defaultValue); + + /** + * + * + *
+   * Optional. Optional query-level arguments.
+   * 
+ * + * + * map<string, .google.firestore.v1.Value> options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.firestore.v1.Value getOptionsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java index 0fe8a4754..af0421140 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -32,6 +32,7 @@ * 4. order_by + start_at + end_at * 5. offset * 6. limit + * 7. find_nearest * * * Protobuf type {@code google.firestore.v1.StructuredQuery} @@ -41,6 +42,7 @@ public final class StructuredQuery extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery) StructuredQueryOrBuilder { private static final long serialVersionUID = 0L; + // Use StructuredQuery.newBuilder() to construct. private StructuredQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -125,6 +127,7 @@ public enum Direction implements com.google.protobuf.ProtocolMessageEnum { * DIRECTION_UNSPECIFIED = 0; */ public static final int DIRECTION_UNSPECIFIED_VALUE = 0; + /** * * @@ -135,6 +138,7 @@ public enum Direction implements com.google.protobuf.ProtocolMessageEnum { * ASCENDING = 1; */ public static final int ASCENDING_VALUE = 1; + /** * * @@ -247,6 +251,7 @@ public interface CollectionSelectorOrBuilder * @return The collectionId. */ java.lang.String getCollectionId(); + /** * * @@ -276,6 +281,7 @@ public interface CollectionSelectorOrBuilder */ boolean getAllDescendants(); } + /** * * @@ -290,6 +296,7 @@ public static final class CollectionSelector extends com.google.protobuf.Generat // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.CollectionSelector) CollectionSelectorOrBuilder { private static final long serialVersionUID = 0L; + // Use CollectionSelector.newBuilder() to construct. private CollectionSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -324,6 +331,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object collectionId_ = ""; + /** * * @@ -348,6 +356,7 @@ public java.lang.String getCollectionId() { return s; } } + /** * * @@ -375,6 +384,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { public static final int ALL_DESCENDANTS_FIELD_NUMBER = 3; private boolean allDescendants_ = false; + /** * * @@ -563,6 +573,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -766,6 +777,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object collectionId_ = ""; + /** * * @@ -789,6 +801,7 @@ public java.lang.String getCollectionId() { return (java.lang.String) ref; } } + /** * * @@ -812,6 +825,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -834,6 +848,7 @@ public Builder setCollectionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -852,6 +867,7 @@ public Builder clearCollectionId() { onChanged(); return this; } + /** * * @@ -877,6 +893,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { } private boolean allDescendants_; + /** * * @@ -894,6 +911,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { public boolean getAllDescendants() { return allDescendants_; } + /** * * @@ -915,6 +933,7 @@ public Builder setAllDescendants(boolean value) { onChanged(); return this; } + /** * * @@ -1017,6 +1036,7 @@ public interface FilterOrBuilder * @return Whether the compositeFilter field is set. */ boolean hasCompositeFilter(); + /** * * @@ -1029,6 +1049,7 @@ public interface FilterOrBuilder * @return The compositeFilter. */ com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilter(); + /** * * @@ -1052,6 +1073,7 @@ public interface FilterOrBuilder * @return Whether the fieldFilter field is set. */ boolean hasFieldFilter(); + /** * * @@ -1064,6 +1086,7 @@ public interface FilterOrBuilder * @return The fieldFilter. */ com.google.firestore.v1.StructuredQuery.FieldFilter getFieldFilter(); + /** * * @@ -1087,6 +1110,7 @@ public interface FilterOrBuilder * @return Whether the unaryFilter field is set. */ boolean hasUnaryFilter(); + /** * * @@ -1099,6 +1123,7 @@ public interface FilterOrBuilder * @return The unaryFilter. */ com.google.firestore.v1.StructuredQuery.UnaryFilter getUnaryFilter(); + /** * * @@ -1112,6 +1137,7 @@ public interface FilterOrBuilder com.google.firestore.v1.StructuredQuery.Filter.FilterTypeCase getFilterTypeCase(); } + /** * * @@ -1126,6 +1152,7 @@ public static final class Filter extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Filter) FilterOrBuilder { private static final long serialVersionUID = 0L; + // Use Filter.newBuilder() to construct. private Filter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1172,6 +1199,7 @@ public enum FilterTypeCase private FilterTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -1207,6 +1235,7 @@ public FilterTypeCase getFilterTypeCase() { } public static final int COMPOSITE_FILTER_FIELD_NUMBER = 1; + /** * * @@ -1222,6 +1251,7 @@ public FilterTypeCase getFilterTypeCase() { public boolean hasCompositeFilter() { return filterTypeCase_ == 1; } + /** * * @@ -1240,6 +1270,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilte } return com.google.firestore.v1.StructuredQuery.CompositeFilter.getDefaultInstance(); } + /** * * @@ -1259,6 +1290,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilte } public static final int FIELD_FILTER_FIELD_NUMBER = 2; + /** * * @@ -1274,6 +1306,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilte public boolean hasFieldFilter() { return filterTypeCase_ == 2; } + /** * * @@ -1292,6 +1325,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter getFieldFilter() { } return com.google.firestore.v1.StructuredQuery.FieldFilter.getDefaultInstance(); } + /** * * @@ -1310,6 +1344,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilterOrBuilder getFieldFilt } public static final int UNARY_FILTER_FIELD_NUMBER = 3; + /** * * @@ -1325,6 +1360,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilterOrBuilder getFieldFilt public boolean hasUnaryFilter() { return filterTypeCase_ == 3; } + /** * * @@ -1343,6 +1379,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter getUnaryFilter() { } return com.google.firestore.v1.StructuredQuery.UnaryFilter.getDefaultInstance(); } + /** * * @@ -1566,6 +1603,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1822,6 +1860,7 @@ public Builder clearFilterType() { com.google.firestore.v1.StructuredQuery.CompositeFilter.Builder, com.google.firestore.v1.StructuredQuery.CompositeFilterOrBuilder> compositeFilterBuilder_; + /** * * @@ -1837,6 +1876,7 @@ public Builder clearFilterType() { public boolean hasCompositeFilter() { return filterTypeCase_ == 1; } + /** * * @@ -1862,6 +1902,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilte return com.google.firestore.v1.StructuredQuery.CompositeFilter.getDefaultInstance(); } } + /** * * @@ -1885,6 +1926,7 @@ public Builder setCompositeFilter( filterTypeCase_ = 1; return this; } + /** * * @@ -1905,6 +1947,7 @@ public Builder setCompositeFilter( filterTypeCase_ = 1; return this; } + /** * * @@ -1939,6 +1982,7 @@ public Builder mergeCompositeFilter( filterTypeCase_ = 1; return this; } + /** * * @@ -1964,6 +2008,7 @@ public Builder clearCompositeFilter() { } return this; } + /** * * @@ -1977,6 +2022,7 @@ public Builder clearCompositeFilter() { getCompositeFilterBuilder() { return getCompositeFilterFieldBuilder().getBuilder(); } + /** * * @@ -1998,6 +2044,7 @@ public Builder clearCompositeFilter() { return com.google.firestore.v1.StructuredQuery.CompositeFilter.getDefaultInstance(); } } + /** * * @@ -2037,6 +2084,7 @@ public Builder clearCompositeFilter() { com.google.firestore.v1.StructuredQuery.FieldFilter.Builder, com.google.firestore.v1.StructuredQuery.FieldFilterOrBuilder> fieldFilterBuilder_; + /** * * @@ -2052,6 +2100,7 @@ public Builder clearCompositeFilter() { public boolean hasFieldFilter() { return filterTypeCase_ == 2; } + /** * * @@ -2077,6 +2126,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter getFieldFilter() { return com.google.firestore.v1.StructuredQuery.FieldFilter.getDefaultInstance(); } } + /** * * @@ -2099,6 +2149,7 @@ public Builder setFieldFilter(com.google.firestore.v1.StructuredQuery.FieldFilte filterTypeCase_ = 2; return this; } + /** * * @@ -2119,6 +2170,7 @@ public Builder setFieldFilter( filterTypeCase_ = 2; return this; } + /** * * @@ -2152,6 +2204,7 @@ public Builder mergeFieldFilter(com.google.firestore.v1.StructuredQuery.FieldFil filterTypeCase_ = 2; return this; } + /** * * @@ -2177,6 +2230,7 @@ public Builder clearFieldFilter() { } return this; } + /** * * @@ -2189,6 +2243,7 @@ public Builder clearFieldFilter() { public com.google.firestore.v1.StructuredQuery.FieldFilter.Builder getFieldFilterBuilder() { return getFieldFilterFieldBuilder().getBuilder(); } + /** * * @@ -2210,6 +2265,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Builder getFieldFilte return com.google.firestore.v1.StructuredQuery.FieldFilter.getDefaultInstance(); } } + /** * * @@ -2248,6 +2304,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Builder getFieldFilte com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder, com.google.firestore.v1.StructuredQuery.UnaryFilterOrBuilder> unaryFilterBuilder_; + /** * * @@ -2263,6 +2320,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Builder getFieldFilte public boolean hasUnaryFilter() { return filterTypeCase_ == 3; } + /** * * @@ -2288,6 +2346,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter getUnaryFilter() { return com.google.firestore.v1.StructuredQuery.UnaryFilter.getDefaultInstance(); } } + /** * * @@ -2310,6 +2369,7 @@ public Builder setUnaryFilter(com.google.firestore.v1.StructuredQuery.UnaryFilte filterTypeCase_ = 3; return this; } + /** * * @@ -2330,6 +2390,7 @@ public Builder setUnaryFilter( filterTypeCase_ = 3; return this; } + /** * * @@ -2363,6 +2424,7 @@ public Builder mergeUnaryFilter(com.google.firestore.v1.StructuredQuery.UnaryFil filterTypeCase_ = 3; return this; } + /** * * @@ -2388,6 +2450,7 @@ public Builder clearUnaryFilter() { } return this; } + /** * * @@ -2400,6 +2463,7 @@ public Builder clearUnaryFilter() { public com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder getUnaryFilterBuilder() { return getUnaryFilterFieldBuilder().getBuilder(); } + /** * * @@ -2421,6 +2485,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder getUnaryFilte return com.google.firestore.v1.StructuredQuery.UnaryFilter.getDefaultInstance(); } } + /** * * @@ -2535,6 +2600,7 @@ public interface CompositeFilterOrBuilder * @return The enum numeric value on the wire for op. */ int getOpValue(); + /** * * @@ -2562,6 +2628,7 @@ public interface CompositeFilterOrBuilder * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ java.util.List getFiltersList(); + /** * * @@ -2576,6 +2643,7 @@ public interface CompositeFilterOrBuilder * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ com.google.firestore.v1.StructuredQuery.Filter getFilters(int index); + /** * * @@ -2590,6 +2658,7 @@ public interface CompositeFilterOrBuilder * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ int getFiltersCount(); + /** * * @@ -2605,6 +2674,7 @@ public interface CompositeFilterOrBuilder */ java.util.List getFiltersOrBuilderList(); + /** * * @@ -2620,6 +2690,7 @@ public interface CompositeFilterOrBuilder */ com.google.firestore.v1.StructuredQuery.FilterOrBuilder getFiltersOrBuilder(int index); } + /** * * @@ -2634,6 +2705,7 @@ public static final class CompositeFilter extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.CompositeFilter) CompositeFilterOrBuilder { private static final long serialVersionUID = 0L; + // Use CompositeFilter.newBuilder() to construct. private CompositeFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2718,6 +2790,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * OPERATOR_UNSPECIFIED = 0; */ public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + /** * * @@ -2728,6 +2801,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * AND = 1; */ public static final int AND_VALUE = 1; + /** * * @@ -2826,6 +2900,7 @@ private Operator(int value) { public static final int OP_FIELD_NUMBER = 1; private int op_ = 0; + /** * * @@ -2841,6 +2916,7 @@ private Operator(int value) { public int getOpValue() { return op_; } + /** * * @@ -2865,6 +2941,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator getOp() @SuppressWarnings("serial") private java.util.List filters_; + /** * * @@ -2882,6 +2959,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator getOp() public java.util.List getFiltersList() { return filters_; } + /** * * @@ -2900,6 +2978,7 @@ public java.util.List getFilters getFiltersOrBuilderList() { return filters_; } + /** * * @@ -2917,6 +2996,7 @@ public java.util.List getFilters public int getFiltersCount() { return filters_.size(); } + /** * * @@ -2934,6 +3014,7 @@ public int getFiltersCount() { public com.google.firestore.v1.StructuredQuery.Filter getFilters(int index) { return filters_.get(index); } + /** * * @@ -3128,6 +3209,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -3375,6 +3457,7 @@ public Builder mergeFrom( private int bitField0_; private int op_ = 0; + /** * * @@ -3390,6 +3473,7 @@ public Builder mergeFrom( public int getOpValue() { return op_; } + /** * * @@ -3408,6 +3492,7 @@ public Builder setOpValue(int value) { onChanged(); return this; } + /** * * @@ -3427,6 +3512,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator getOp() ? com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator.UNRECOGNIZED : result; } + /** * * @@ -3448,6 +3534,7 @@ public Builder setOp(com.google.firestore.v1.StructuredQuery.CompositeFilter.Ope onChanged(); return this; } + /** * * @@ -3503,6 +3590,7 @@ public java.util.List getFilters return filtersBuilder_.getMessageList(); } } + /** * * @@ -3523,6 +3611,7 @@ public int getFiltersCount() { return filtersBuilder_.getCount(); } } + /** * * @@ -3543,6 +3632,7 @@ public com.google.firestore.v1.StructuredQuery.Filter getFilters(int index) { return filtersBuilder_.getMessage(index); } } + /** * * @@ -3569,6 +3659,7 @@ public Builder setFilters(int index, com.google.firestore.v1.StructuredQuery.Fil } return this; } + /** * * @@ -3593,6 +3684,7 @@ public Builder setFilters( } return this; } + /** * * @@ -3619,6 +3711,7 @@ public Builder addFilters(com.google.firestore.v1.StructuredQuery.Filter value) } return this; } + /** * * @@ -3645,6 +3738,7 @@ public Builder addFilters(int index, com.google.firestore.v1.StructuredQuery.Fil } return this; } + /** * * @@ -3669,6 +3763,7 @@ public Builder addFilters( } return this; } + /** * * @@ -3693,6 +3788,7 @@ public Builder addFilters( } return this; } + /** * * @@ -3717,6 +3813,7 @@ public Builder addAllFilters( } return this; } + /** * * @@ -3740,6 +3837,7 @@ public Builder clearFilters() { } return this; } + /** * * @@ -3763,6 +3861,7 @@ public Builder removeFilters(int index) { } return this; } + /** * * @@ -3779,6 +3878,7 @@ public Builder removeFilters(int index) { public com.google.firestore.v1.StructuredQuery.Filter.Builder getFiltersBuilder(int index) { return getFiltersFieldBuilder().getBuilder(index); } + /** * * @@ -3800,6 +3900,7 @@ public com.google.firestore.v1.StructuredQuery.FilterOrBuilder getFiltersOrBuild return filtersBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -3821,6 +3922,7 @@ public com.google.firestore.v1.StructuredQuery.FilterOrBuilder getFiltersOrBuild return java.util.Collections.unmodifiableList(filters_); } } + /** * * @@ -3838,6 +3940,7 @@ public com.google.firestore.v1.StructuredQuery.Filter.Builder addFiltersBuilder( return getFiltersFieldBuilder() .addBuilder(com.google.firestore.v1.StructuredQuery.Filter.getDefaultInstance()); } + /** * * @@ -3855,6 +3958,7 @@ public com.google.firestore.v1.StructuredQuery.Filter.Builder addFiltersBuilder( return getFiltersFieldBuilder() .addBuilder(index, com.google.firestore.v1.StructuredQuery.Filter.getDefaultInstance()); } + /** * * @@ -3971,6 +4075,7 @@ public interface FieldFilterOrBuilder * @return Whether the field field is set. */ boolean hasField(); + /** * * @@ -3983,6 +4088,7 @@ public interface FieldFilterOrBuilder * @return The field. */ com.google.firestore.v1.StructuredQuery.FieldReference getField(); + /** * * @@ -4006,6 +4112,7 @@ public interface FieldFilterOrBuilder * @return The enum numeric value on the wire for op. */ int getOpValue(); + /** * * @@ -4031,6 +4138,7 @@ public interface FieldFilterOrBuilder * @return Whether the value field is set. */ boolean hasValue(); + /** * * @@ -4043,6 +4151,7 @@ public interface FieldFilterOrBuilder * @return The value. */ com.google.firestore.v1.Value getValue(); + /** * * @@ -4054,6 +4163,7 @@ public interface FieldFilterOrBuilder */ com.google.firestore.v1.ValueOrBuilder getValueOrBuilder(); } + /** * * @@ -4068,6 +4178,7 @@ public static final class FieldFilter extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.FieldFilter) FieldFilterOrBuilder { private static final long serialVersionUID = 0L; + // Use FieldFilter.newBuilder() to construct. private FieldFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -4273,6 +4384,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * OPERATOR_UNSPECIFIED = 0; */ public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + /** * * @@ -4287,6 +4399,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * LESS_THAN = 1; */ public static final int LESS_THAN_VALUE = 1; + /** * * @@ -4301,6 +4414,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * LESS_THAN_OR_EQUAL = 2; */ public static final int LESS_THAN_OR_EQUAL_VALUE = 2; + /** * * @@ -4315,6 +4429,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * GREATER_THAN = 3; */ public static final int GREATER_THAN_VALUE = 3; + /** * * @@ -4329,6 +4444,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * GREATER_THAN_OR_EQUAL = 4; */ public static final int GREATER_THAN_OR_EQUAL_VALUE = 4; + /** * * @@ -4339,6 +4455,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * EQUAL = 5; */ public static final int EQUAL_VALUE = 5; + /** * * @@ -4354,6 +4471,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * NOT_EQUAL = 6; */ public static final int NOT_EQUAL_VALUE = 6; + /** * * @@ -4364,6 +4482,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * ARRAY_CONTAINS = 7; */ public static final int ARRAY_CONTAINS_VALUE = 7; + /** * * @@ -4380,6 +4499,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * IN = 8; */ public static final int IN_VALUE = 8; + /** * * @@ -4398,6 +4518,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * ARRAY_CONTAINS_ANY = 9; */ public static final int ARRAY_CONTAINS_ANY_VALUE = 9; + /** * * @@ -4520,6 +4641,7 @@ private Operator(int value) { private int bitField0_; public static final int FIELD_FIELD_NUMBER = 1; private com.google.firestore.v1.StructuredQuery.FieldReference field_; + /** * * @@ -4535,6 +4657,7 @@ private Operator(int value) { public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -4552,6 +4675,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() : field_; } + /** * * @@ -4570,6 +4694,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO public static final int OP_FIELD_NUMBER = 2; private int op_ = 0; + /** * * @@ -4585,6 +4710,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO public int getOpValue() { return op_; } + /** * * @@ -4607,6 +4733,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Operator getOp() { public static final int VALUE_FIELD_NUMBER = 3; private com.google.firestore.v1.Value value_; + /** * * @@ -4622,6 +4749,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Operator getOp() { public boolean hasValue() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -4637,6 +4765,7 @@ public boolean hasValue() { public com.google.firestore.v1.Value getValue() { return value_ == null ? com.google.firestore.v1.Value.getDefaultInstance() : value_; } + /** * * @@ -4844,6 +4973,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -5082,6 +5212,7 @@ public Builder mergeFrom( com.google.firestore.v1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> fieldBuilder_; + /** * * @@ -5096,6 +5227,7 @@ public Builder mergeFrom( public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5116,6 +5248,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { return fieldBuilder_.getMessage(); } } + /** * * @@ -5138,6 +5271,7 @@ public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference v onChanged(); return this; } + /** * * @@ -5158,6 +5292,7 @@ public Builder setField( onChanged(); return this; } + /** * * @@ -5186,6 +5321,7 @@ public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference } return this; } + /** * * @@ -5205,6 +5341,7 @@ public Builder clearField() { onChanged(); return this; } + /** * * @@ -5219,6 +5356,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBu onChanged(); return getFieldFieldBuilder().getBuilder(); } + /** * * @@ -5237,6 +5375,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO : field_; } } + /** * * @@ -5264,6 +5403,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO } private int op_ = 0; + /** * * @@ -5279,6 +5419,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO public int getOpValue() { return op_; } + /** * * @@ -5297,6 +5438,7 @@ public Builder setOpValue(int value) { onChanged(); return this; } + /** * * @@ -5316,6 +5458,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Operator getOp() { ? com.google.firestore.v1.StructuredQuery.FieldFilter.Operator.UNRECOGNIZED : result; } + /** * * @@ -5337,6 +5480,7 @@ public Builder setOp(com.google.firestore.v1.StructuredQuery.FieldFilter.Operato onChanged(); return this; } + /** * * @@ -5361,6 +5505,7 @@ public Builder clearOp() { com.google.firestore.v1.Value.Builder, com.google.firestore.v1.ValueOrBuilder> valueBuilder_; + /** * * @@ -5375,6 +5520,7 @@ public Builder clearOp() { public boolean hasValue() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -5393,6 +5539,7 @@ public com.google.firestore.v1.Value getValue() { return valueBuilder_.getMessage(); } } + /** * * @@ -5415,6 +5562,7 @@ public Builder setValue(com.google.firestore.v1.Value value) { onChanged(); return this; } + /** * * @@ -5434,6 +5582,7 @@ public Builder setValue(com.google.firestore.v1.Value.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -5461,6 +5610,7 @@ public Builder mergeValue(com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -5480,6 +5630,7 @@ public Builder clearValue() { onChanged(); return this; } + /** * * @@ -5494,6 +5645,7 @@ public com.google.firestore.v1.Value.Builder getValueBuilder() { onChanged(); return getValueFieldBuilder().getBuilder(); } + /** * * @@ -5510,6 +5662,7 @@ public com.google.firestore.v1.ValueOrBuilder getValueOrBuilder() { return value_ == null ? com.google.firestore.v1.Value.getDefaultInstance() : value_; } } + /** * * @@ -5617,6 +5770,7 @@ public interface UnaryFilterOrBuilder * @return The enum numeric value on the wire for op. */ int getOpValue(); + /** * * @@ -5642,6 +5796,7 @@ public interface UnaryFilterOrBuilder * @return Whether the field field is set. */ boolean hasField(); + /** * * @@ -5654,6 +5809,7 @@ public interface UnaryFilterOrBuilder * @return The field. */ com.google.firestore.v1.StructuredQuery.FieldReference getField(); + /** * * @@ -5667,6 +5823,7 @@ public interface UnaryFilterOrBuilder com.google.firestore.v1.StructuredQuery.UnaryFilter.OperandTypeCase getOperandTypeCase(); } + /** * * @@ -5681,6 +5838,7 @@ public static final class UnaryFilter extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.UnaryFilter) UnaryFilterOrBuilder { private static final long serialVersionUID = 0L; + // Use UnaryFilter.newBuilder() to construct. private UnaryFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -5794,6 +5952,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * OPERATOR_UNSPECIFIED = 0; */ public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + /** * * @@ -5804,6 +5963,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * IS_NAN = 2; */ public static final int IS_NAN_VALUE = 2; + /** * * @@ -5814,6 +5974,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * IS_NULL = 3; */ public static final int IS_NULL_VALUE = 3; + /** * * @@ -5829,6 +5990,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * IS_NOT_NAN = 4; */ public static final int IS_NOT_NAN_VALUE = 4; + /** * * @@ -5950,6 +6112,7 @@ public enum OperandTypeCase private OperandTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -5982,6 +6145,7 @@ public OperandTypeCase getOperandTypeCase() { public static final int OP_FIELD_NUMBER = 1; private int op_ = 0; + /** * * @@ -5997,6 +6161,7 @@ public OperandTypeCase getOperandTypeCase() { public int getOpValue() { return op_; } + /** * * @@ -6018,6 +6183,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp() { } public static final int FIELD_FIELD_NUMBER = 2; + /** * * @@ -6033,6 +6199,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp() { public boolean hasField() { return operandTypeCase_ == 2; } + /** * * @@ -6051,6 +6218,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { } return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } + /** * * @@ -6258,6 +6426,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -6488,6 +6657,7 @@ public Builder clearOperandType() { private int bitField0_; private int op_ = 0; + /** * * @@ -6503,6 +6673,7 @@ public Builder clearOperandType() { public int getOpValue() { return op_; } + /** * * @@ -6521,6 +6692,7 @@ public Builder setOpValue(int value) { onChanged(); return this; } + /** * * @@ -6540,6 +6712,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp() { ? com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED : result; } + /** * * @@ -6561,6 +6734,7 @@ public Builder setOp(com.google.firestore.v1.StructuredQuery.UnaryFilter.Operato onChanged(); return this; } + /** * * @@ -6584,6 +6758,7 @@ public Builder clearOp() { com.google.firestore.v1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> fieldBuilder_; + /** * * @@ -6599,6 +6774,7 @@ public Builder clearOp() { public boolean hasField() { return operandTypeCase_ == 2; } + /** * * @@ -6624,6 +6800,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } } + /** * * @@ -6646,6 +6823,7 @@ public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference v operandTypeCase_ = 2; return this; } + /** * * @@ -6666,6 +6844,7 @@ public Builder setField( operandTypeCase_ = 2; return this; } + /** * * @@ -6699,6 +6878,7 @@ public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference operandTypeCase_ = 2; return this; } + /** * * @@ -6724,6 +6904,7 @@ public Builder clearField() { } return this; } + /** * * @@ -6736,6 +6917,7 @@ public Builder clearField() { public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { return getFieldFieldBuilder().getBuilder(); } + /** * * @@ -6756,6 +6938,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } } + /** * * @@ -6871,6 +7054,7 @@ public interface OrderOrBuilder * @return Whether the field field is set. */ boolean hasField(); + /** * * @@ -6883,6 +7067,7 @@ public interface OrderOrBuilder * @return The field. */ com.google.firestore.v1.StructuredQuery.FieldReference getField(); + /** * * @@ -6906,6 +7091,7 @@ public interface OrderOrBuilder * @return The enum numeric value on the wire for direction. */ int getDirectionValue(); + /** * * @@ -6919,6 +7105,7 @@ public interface OrderOrBuilder */ com.google.firestore.v1.StructuredQuery.Direction getDirection(); } + /** * * @@ -6933,6 +7120,7 @@ public static final class Order extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Order) OrderOrBuilder { private static final long serialVersionUID = 0L; + // Use Order.newBuilder() to construct. private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -6966,6 +7154,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int FIELD_FIELD_NUMBER = 1; private com.google.firestore.v1.StructuredQuery.FieldReference field_; + /** * * @@ -6981,6 +7170,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -6998,6 +7188,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() : field_; } + /** * * @@ -7016,6 +7207,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO public static final int DIRECTION_FIELD_NUMBER = 2; private int direction_ = 0; + /** * * @@ -7031,6 +7223,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO public int getDirectionValue() { return direction_; } + /** * * @@ -7227,6 +7420,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -7446,6 +7640,7 @@ public Builder mergeFrom( com.google.firestore.v1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> fieldBuilder_; + /** * * @@ -7460,6 +7655,7 @@ public Builder mergeFrom( public boolean hasField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -7480,6 +7676,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { return fieldBuilder_.getMessage(); } } + /** * * @@ -7502,6 +7699,7 @@ public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference v onChanged(); return this; } + /** * * @@ -7522,6 +7720,7 @@ public Builder setField( onChanged(); return this; } + /** * * @@ -7550,6 +7749,7 @@ public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference } return this; } + /** * * @@ -7569,6 +7769,7 @@ public Builder clearField() { onChanged(); return this; } + /** * * @@ -7583,6 +7784,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBu onChanged(); return getFieldFieldBuilder().getBuilder(); } + /** * * @@ -7601,6 +7803,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO : field_; } } + /** * * @@ -7628,6 +7831,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO } private int direction_ = 0; + /** * * @@ -7643,6 +7847,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO public int getDirectionValue() { return direction_; } + /** * * @@ -7661,6 +7866,7 @@ public Builder setDirectionValue(int value) { onChanged(); return this; } + /** * * @@ -7680,6 +7886,7 @@ public com.google.firestore.v1.StructuredQuery.Direction getDirection() { ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED : result; } + /** * * @@ -7701,6 +7908,7 @@ public Builder setDirection(com.google.firestore.v1.StructuredQuery.Direction va onChanged(); return this; } + /** * * @@ -7806,6 +8014,7 @@ public interface FieldReferenceOrBuilder * @return The fieldPath. */ java.lang.String getFieldPath(); + /** * * @@ -7825,6 +8034,7 @@ public interface FieldReferenceOrBuilder */ com.google.protobuf.ByteString getFieldPathBytes(); } + /** * * @@ -7839,6 +8049,7 @@ public static final class FieldReference extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.FieldReference) FieldReferenceOrBuilder { private static final long serialVersionUID = 0L; + // Use FieldReference.newBuilder() to construct. private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -7873,6 +8084,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object fieldPath_ = ""; + /** * * @@ -7902,6 +8114,7 @@ public java.lang.String getFieldPath() { return s; } } + /** * * @@ -8093,6 +8306,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -8280,6 +8494,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object fieldPath_ = ""; + /** * * @@ -8308,6 +8523,7 @@ public java.lang.String getFieldPath() { return (java.lang.String) ref; } } + /** * * @@ -8336,6 +8552,7 @@ public com.google.protobuf.ByteString getFieldPathBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -8363,6 +8580,7 @@ public Builder setFieldPath(java.lang.String value) { onChanged(); return this; } + /** * * @@ -8386,6 +8604,7 @@ public Builder clearFieldPath() { onChanged(); return this; } + /** * * @@ -8497,6 +8716,7 @@ public interface ProjectionOrBuilder * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ java.util.List getFieldsList(); + /** * * @@ -8510,6 +8730,7 @@ public interface ProjectionOrBuilder * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index); + /** * * @@ -8523,6 +8744,7 @@ public interface ProjectionOrBuilder * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ int getFieldsCount(); + /** * * @@ -8537,6 +8759,7 @@ public interface ProjectionOrBuilder */ java.util.List getFieldsOrBuilderList(); + /** * * @@ -8551,6 +8774,7 @@ public interface ProjectionOrBuilder */ com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder(int index); } + /** * * @@ -8565,6 +8789,7 @@ public static final class Projection extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Projection) ProjectionOrBuilder { private static final long serialVersionUID = 0L; + // Use Projection.newBuilder() to construct. private Projection(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -8599,6 +8824,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List fields_; + /** * * @@ -8615,6 +8841,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getFieldsList() { return fields_; } + /** * * @@ -8632,6 +8859,7 @@ public java.util.List ge getFieldsOrBuilderList() { return fields_; } + /** * * @@ -8648,6 +8876,7 @@ public java.util.List ge public int getFieldsCount() { return fields_.size(); } + /** * * @@ -8664,6 +8893,7 @@ public int getFieldsCount() { public com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index) { return fields_.get(index); } + /** * * @@ -8844,6 +9074,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -9115,6 +9346,7 @@ private void ensureFieldsIsMutable() { return fieldsBuilder_.getMessageList(); } } + /** * * @@ -9134,6 +9366,7 @@ public int getFieldsCount() { return fieldsBuilder_.getCount(); } } + /** * * @@ -9153,6 +9386,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getFields(int inde return fieldsBuilder_.getMessage(index); } } + /** * * @@ -9179,6 +9413,7 @@ public Builder setFields( } return this; } + /** * * @@ -9203,6 +9438,7 @@ public Builder setFields( } return this; } + /** * * @@ -9228,6 +9464,7 @@ public Builder addFields(com.google.firestore.v1.StructuredQuery.FieldReference } return this; } + /** * * @@ -9254,6 +9491,7 @@ public Builder addFields( } return this; } + /** * * @@ -9277,6 +9515,7 @@ public Builder addFields( } return this; } + /** * * @@ -9301,6 +9540,7 @@ public Builder addFields( } return this; } + /** * * @@ -9325,6 +9565,7 @@ public Builder addAllFields( } return this; } + /** * * @@ -9347,6 +9588,7 @@ public Builder clearFields() { } return this; } + /** * * @@ -9369,6 +9611,7 @@ public Builder removeFields(int index) { } return this; } + /** * * @@ -9385,6 +9628,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldsB int index) { return getFieldsFieldBuilder().getBuilder(index); } + /** * * @@ -9405,6 +9649,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFields return fieldsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -9426,6 +9671,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFields return java.util.Collections.unmodifiableList(fields_); } } + /** * * @@ -9443,6 +9689,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference.Builder addFieldsB .addBuilder( com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()); } + /** * * @@ -9461,6 +9708,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference.Builder addFieldsB .addBuilder( index, com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()); } + /** * * @@ -9580,6 +9828,7 @@ public interface FindNearestOrBuilder * @return Whether the vectorField field is set. */ boolean hasVectorField(); + /** * * @@ -9596,6 +9845,7 @@ public interface FindNearestOrBuilder * @return The vectorField. */ com.google.firestore.v1.StructuredQuery.FieldReference getVectorField(); + /** * * @@ -9625,6 +9875,7 @@ public interface FindNearestOrBuilder * @return Whether the queryVector field is set. */ boolean hasQueryVector(); + /** * * @@ -9639,6 +9890,7 @@ public interface FindNearestOrBuilder * @return The queryVector. */ com.google.firestore.v1.Value getQueryVector(); + /** * * @@ -9666,6 +9918,7 @@ public interface FindNearestOrBuilder * @return The enum numeric value on the wire for distanceMeasure. */ int getDistanceMeasureValue(); + /** * * @@ -9694,6 +9947,7 @@ public interface FindNearestOrBuilder * @return Whether the limit field is set. */ boolean hasLimit(); + /** * * @@ -9707,6 +9961,7 @@ public interface FindNearestOrBuilder * @return The limit. */ com.google.protobuf.Int32Value getLimit(); + /** * * @@ -9733,6 +9988,7 @@ public interface FindNearestOrBuilder * @return The distanceResultField. */ java.lang.String getDistanceResultField(); + /** * * @@ -9758,8 +10014,8 @@ public interface FindNearestOrBuilder * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -9769,6 +10025,7 @@ public interface FindNearestOrBuilder * @return Whether the distanceThreshold field is set. */ boolean hasDistanceThreshold(); + /** * * @@ -9779,8 +10036,8 @@ public interface FindNearestOrBuilder * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -9790,6 +10047,7 @@ public interface FindNearestOrBuilder * @return The distanceThreshold. */ com.google.protobuf.DoubleValue getDistanceThreshold(); + /** * * @@ -9800,8 +10058,8 @@ public interface FindNearestOrBuilder * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -9810,6 +10068,7 @@ public interface FindNearestOrBuilder */ com.google.protobuf.DoubleValueOrBuilder getDistanceThresholdOrBuilder(); } + /** * * @@ -9827,6 +10086,7 @@ public static final class FindNearest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.FindNearest) FindNearestOrBuilder { private static final long serialVersionUID = 0L; + // Use FindNearest.newBuilder() to construct. private FindNearest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -9933,6 +10193,7 @@ public enum DistanceMeasure implements com.google.protobuf.ProtocolMessageEnum { * DISTANCE_MEASURE_UNSPECIFIED = 0; */ public static final int DISTANCE_MEASURE_UNSPECIFIED_VALUE = 0; + /** * * @@ -9946,6 +10207,7 @@ public enum DistanceMeasure implements com.google.protobuf.ProtocolMessageEnum { * EUCLIDEAN = 1; */ public static final int EUCLIDEAN_VALUE = 1; + /** * * @@ -9963,6 +10225,7 @@ public enum DistanceMeasure implements com.google.protobuf.ProtocolMessageEnum { * COSINE = 2; */ public static final int COSINE_VALUE = 2; + /** * * @@ -10069,6 +10332,7 @@ private DistanceMeasure(int value) { private int bitField0_; public static final int VECTOR_FIELD_FIELD_NUMBER = 1; private com.google.firestore.v1.StructuredQuery.FieldReference vectorField_; + /** * * @@ -10088,6 +10352,7 @@ private DistanceMeasure(int value) { public boolean hasVectorField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -10109,6 +10374,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getVectorField() { ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() : vectorField_; } + /** * * @@ -10132,6 +10398,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getVectorField() { public static final int QUERY_VECTOR_FIELD_NUMBER = 2; private com.google.firestore.v1.Value queryVector_; + /** * * @@ -10149,6 +10416,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getVectorField() { public boolean hasQueryVector() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -10168,6 +10436,7 @@ public com.google.firestore.v1.Value getQueryVector() { ? com.google.firestore.v1.Value.getDefaultInstance() : queryVector_; } + /** * * @@ -10188,6 +10457,7 @@ public com.google.firestore.v1.ValueOrBuilder getQueryVectorOrBuilder() { public static final int DISTANCE_MEASURE_FIELD_NUMBER = 3; private int distanceMeasure_ = 0; + /** * * @@ -10205,6 +10475,7 @@ public com.google.firestore.v1.ValueOrBuilder getQueryVectorOrBuilder() { public int getDistanceMeasureValue() { return distanceMeasure_; } + /** * * @@ -10231,6 +10502,7 @@ public int getDistanceMeasureValue() { public static final int LIMIT_FIELD_NUMBER = 4; private com.google.protobuf.Int32Value limit_; + /** * * @@ -10247,6 +10519,7 @@ public int getDistanceMeasureValue() { public boolean hasLimit() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -10263,6 +10536,7 @@ public boolean hasLimit() { public com.google.protobuf.Int32Value getLimit() { return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; } + /** * * @@ -10282,6 +10556,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object distanceResultField_ = ""; + /** * * @@ -10307,6 +10582,7 @@ public java.lang.String getDistanceResultField() { return s; } } + /** * * @@ -10335,6 +10611,7 @@ public com.google.protobuf.ByteString getDistanceResultFieldBytes() { public static final int DISTANCE_THRESHOLD_FIELD_NUMBER = 6; private com.google.protobuf.DoubleValue distanceThreshold_; + /** * * @@ -10345,8 +10622,8 @@ public com.google.protobuf.ByteString getDistanceResultFieldBytes() { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -10359,6 +10636,7 @@ public com.google.protobuf.ByteString getDistanceResultFieldBytes() { public boolean hasDistanceThreshold() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -10369,8 +10647,8 @@ public boolean hasDistanceThreshold() { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -10385,6 +10663,7 @@ public com.google.protobuf.DoubleValue getDistanceThreshold() { ? com.google.protobuf.DoubleValue.getDefaultInstance() : distanceThreshold_; } + /** * * @@ -10395,8 +10674,8 @@ public com.google.protobuf.DoubleValue getDistanceThreshold() { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -10642,6 +10921,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -10942,6 +11222,7 @@ public Builder mergeFrom( com.google.firestore.v1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> vectorFieldBuilder_; + /** * * @@ -10960,6 +11241,7 @@ public Builder mergeFrom( public boolean hasVectorField() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -10984,6 +11266,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getVectorField() { return vectorFieldBuilder_.getMessage(); } } + /** * * @@ -11010,6 +11293,7 @@ public Builder setVectorField(com.google.firestore.v1.StructuredQuery.FieldRefer onChanged(); return this; } + /** * * @@ -11034,6 +11318,7 @@ public Builder setVectorField( onChanged(); return this; } + /** * * @@ -11067,6 +11352,7 @@ public Builder mergeVectorField( } return this; } + /** * * @@ -11090,6 +11376,7 @@ public Builder clearVectorField() { onChanged(); return this; } + /** * * @@ -11109,6 +11396,7 @@ public Builder clearVectorField() { onChanged(); return getVectorFieldFieldBuilder().getBuilder(); } + /** * * @@ -11132,6 +11420,7 @@ public Builder clearVectorField() { : vectorField_; } } + /** * * @@ -11168,6 +11457,7 @@ public Builder clearVectorField() { com.google.firestore.v1.Value.Builder, com.google.firestore.v1.ValueOrBuilder> queryVectorBuilder_; + /** * * @@ -11185,6 +11475,7 @@ public Builder clearVectorField() { public boolean hasQueryVector() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -11208,6 +11499,7 @@ public com.google.firestore.v1.Value getQueryVector() { return queryVectorBuilder_.getMessage(); } } + /** * * @@ -11233,6 +11525,7 @@ public Builder setQueryVector(com.google.firestore.v1.Value value) { onChanged(); return this; } + /** * * @@ -11255,6 +11548,7 @@ public Builder setQueryVector(com.google.firestore.v1.Value.Builder builderForVa onChanged(); return this; } + /** * * @@ -11285,6 +11579,7 @@ public Builder mergeQueryVector(com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -11307,6 +11602,7 @@ public Builder clearQueryVector() { onChanged(); return this; } + /** * * @@ -11324,6 +11620,7 @@ public com.google.firestore.v1.Value.Builder getQueryVectorBuilder() { onChanged(); return getQueryVectorFieldBuilder().getBuilder(); } + /** * * @@ -11345,6 +11642,7 @@ public com.google.firestore.v1.ValueOrBuilder getQueryVectorOrBuilder() { : queryVector_; } } + /** * * @@ -11375,6 +11673,7 @@ public com.google.firestore.v1.ValueOrBuilder getQueryVectorOrBuilder() { } private int distanceMeasure_ = 0; + /** * * @@ -11392,6 +11691,7 @@ public com.google.firestore.v1.ValueOrBuilder getQueryVectorOrBuilder() { public int getDistanceMeasureValue() { return distanceMeasure_; } + /** * * @@ -11412,6 +11712,7 @@ public Builder setDistanceMeasureValue(int value) { onChanged(); return this; } + /** * * @@ -11435,6 +11736,7 @@ public Builder setDistanceMeasureValue(int value) { ? com.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure.UNRECOGNIZED : result; } + /** * * @@ -11459,6 +11761,7 @@ public Builder setDistanceMeasure( onChanged(); return this; } + /** * * @@ -11485,6 +11788,7 @@ public Builder clearDistanceMeasure() { com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** * * @@ -11501,6 +11805,7 @@ public Builder clearDistanceMeasure() { public boolean hasLimit() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -11521,6 +11826,7 @@ public com.google.protobuf.Int32Value getLimit() { return limitBuilder_.getMessage(); } } + /** * * @@ -11545,6 +11851,7 @@ public Builder setLimit(com.google.protobuf.Int32Value value) { onChanged(); return this; } + /** * * @@ -11566,6 +11873,7 @@ public Builder setLimit(com.google.protobuf.Int32Value.Builder builderForValue) onChanged(); return this; } + /** * * @@ -11595,6 +11903,7 @@ public Builder mergeLimit(com.google.protobuf.Int32Value value) { } return this; } + /** * * @@ -11616,6 +11925,7 @@ public Builder clearLimit() { onChanged(); return this; } + /** * * @@ -11632,6 +11942,7 @@ public com.google.protobuf.Int32Value.Builder getLimitBuilder() { onChanged(); return getLimitFieldBuilder().getBuilder(); } + /** * * @@ -11650,6 +11961,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; } } + /** * * @@ -11679,6 +11991,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { } private java.lang.Object distanceResultField_ = ""; + /** * * @@ -11703,6 +12016,7 @@ public java.lang.String getDistanceResultField() { return (java.lang.String) ref; } } + /** * * @@ -11727,6 +12041,7 @@ public com.google.protobuf.ByteString getDistanceResultFieldBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -11750,6 +12065,7 @@ public Builder setDistanceResultField(java.lang.String value) { onChanged(); return this; } + /** * * @@ -11769,6 +12085,7 @@ public Builder clearDistanceResultField() { onChanged(); return this; } + /** * * @@ -11800,6 +12117,7 @@ public Builder setDistanceResultFieldBytes(com.google.protobuf.ByteString value) com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> distanceThresholdBuilder_; + /** * * @@ -11810,8 +12128,8 @@ public Builder setDistanceResultFieldBytes(com.google.protobuf.ByteString value) * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -11823,6 +12141,7 @@ public Builder setDistanceResultFieldBytes(com.google.protobuf.ByteString value) public boolean hasDistanceThreshold() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -11833,8 +12152,8 @@ public boolean hasDistanceThreshold() { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -11852,6 +12171,7 @@ public com.google.protobuf.DoubleValue getDistanceThreshold() { return distanceThresholdBuilder_.getMessage(); } } + /** * * @@ -11862,8 +12182,8 @@ public com.google.protobuf.DoubleValue getDistanceThreshold() { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -11883,6 +12203,7 @@ public Builder setDistanceThreshold(com.google.protobuf.DoubleValue value) { onChanged(); return this; } + /** * * @@ -11893,8 +12214,8 @@ public Builder setDistanceThreshold(com.google.protobuf.DoubleValue value) { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -11911,6 +12232,7 @@ public Builder setDistanceThreshold(com.google.protobuf.DoubleValue.Builder buil onChanged(); return this; } + /** * * @@ -11921,8 +12243,8 @@ public Builder setDistanceThreshold(com.google.protobuf.DoubleValue.Builder buil * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -11947,6 +12269,7 @@ public Builder mergeDistanceThreshold(com.google.protobuf.DoubleValue value) { } return this; } + /** * * @@ -11957,8 +12280,8 @@ public Builder mergeDistanceThreshold(com.google.protobuf.DoubleValue value) { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -11975,6 +12298,7 @@ public Builder clearDistanceThreshold() { onChanged(); return this; } + /** * * @@ -11985,8 +12309,8 @@ public Builder clearDistanceThreshold() { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -11998,6 +12322,7 @@ public com.google.protobuf.DoubleValue.Builder getDistanceThresholdBuilder() { onChanged(); return getDistanceThresholdFieldBuilder().getBuilder(); } + /** * * @@ -12008,8 +12333,8 @@ public com.google.protobuf.DoubleValue.Builder getDistanceThresholdBuilder() { * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -12025,6 +12350,7 @@ public com.google.protobuf.DoubleValueOrBuilder getDistanceThresholdOrBuilder() : distanceThreshold_; } } + /** * * @@ -12035,8 +12361,8 @@ public com.google.protobuf.DoubleValueOrBuilder getDistanceThresholdOrBuilder() * Since DOT_PRODUCT distances increase when the vectors are more similar, * the comparison is inverted. * - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold + * * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + * * For DOT_PRODUCT: WHERE distance >= distance_threshold * * * @@ -12127,6 +12453,7 @@ public com.google.firestore.v1.StructuredQuery.FindNearest getDefaultInstanceFor private int bitField0_; public static final int SELECT_FIELD_NUMBER = 1; private com.google.firestore.v1.StructuredQuery.Projection select_; + /** * * @@ -12146,6 +12473,7 @@ public com.google.firestore.v1.StructuredQuery.FindNearest getDefaultInstanceFor public boolean hasSelect() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -12167,6 +12495,7 @@ public com.google.firestore.v1.StructuredQuery.Projection getSelect() { ? com.google.firestore.v1.StructuredQuery.Projection.getDefaultInstance() : select_; } + /** * * @@ -12191,6 +12520,7 @@ public com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder getSelectOrBu @SuppressWarnings("serial") private java.util.List from_; + /** * * @@ -12204,6 +12534,7 @@ public com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder getSelectOrBu public java.util.List getFromList() { return from_; } + /** * * @@ -12219,6 +12550,7 @@ public java.util.List orderBy_; + /** * * @@ -12346,6 +12684,7 @@ public com.google.firestore.v1.StructuredQuery.FilterOrBuilder getWhereOrBuilder public java.util.List getOrderByList() { return orderBy_; } + /** * * @@ -12379,6 +12718,7 @@ public java.util.List getOrderByL getOrderByOrBuilderList() { return orderBy_; } + /** * * @@ -12411,6 +12751,7 @@ public java.util.List getOrderByL public int getOrderByCount() { return orderBy_.size(); } + /** * * @@ -12443,6 +12784,7 @@ public int getOrderByCount() { public com.google.firestore.v1.StructuredQuery.Order getOrderBy(int index) { return orderBy_.get(index); } + /** * * @@ -12478,6 +12820,7 @@ public com.google.firestore.v1.StructuredQuery.OrderOrBuilder getOrderByOrBuilde public static final int START_AT_FIELD_NUMBER = 7; private com.google.firestore.v1.Cursor startAt_; + /** * * @@ -12523,6 +12866,7 @@ public com.google.firestore.v1.StructuredQuery.OrderOrBuilder getOrderByOrBuilde public boolean hasStartAt() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -12568,6 +12912,7 @@ public boolean hasStartAt() { public com.google.firestore.v1.Cursor getStartAt() { return startAt_ == null ? com.google.firestore.v1.Cursor.getDefaultInstance() : startAt_; } + /** * * @@ -12614,6 +12959,7 @@ public com.google.firestore.v1.CursorOrBuilder getStartAtOrBuilder() { public static final int END_AT_FIELD_NUMBER = 8; private com.google.firestore.v1.Cursor endAt_; + /** * * @@ -12637,6 +12983,7 @@ public com.google.firestore.v1.CursorOrBuilder getStartAtOrBuilder() { public boolean hasEndAt() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -12660,6 +13007,7 @@ public boolean hasEndAt() { public com.google.firestore.v1.Cursor getEndAt() { return endAt_ == null ? com.google.firestore.v1.Cursor.getDefaultInstance() : endAt_; } + /** * * @@ -12684,6 +13032,7 @@ public com.google.firestore.v1.CursorOrBuilder getEndAtOrBuilder() { public static final int OFFSET_FIELD_NUMBER = 6; private int offset_ = 0; + /** * * @@ -12709,6 +13058,7 @@ public int getOffset() { public static final int LIMIT_FIELD_NUMBER = 5; private com.google.protobuf.Int32Value limit_; + /** * * @@ -12730,6 +13080,7 @@ public int getOffset() { public boolean hasLimit() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -12751,6 +13102,7 @@ public boolean hasLimit() { public com.google.protobuf.Int32Value getLimit() { return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; } + /** * * @@ -12773,6 +13125,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { public static final int FIND_NEAREST_FIELD_NUMBER = 9; private com.google.firestore.v1.StructuredQuery.FindNearest findNearest_; + /** * * @@ -12794,6 +13147,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { public boolean hasFindNearest() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -12817,6 +13171,7 @@ public com.google.firestore.v1.StructuredQuery.FindNearest getFindNearest() { ? com.google.firestore.v1.StructuredQuery.FindNearest.getDefaultInstance() : findNearest_; } + /** * * @@ -13103,6 +13458,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -13116,6 +13472,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * 4. order_by + start_at + end_at * 5. offset * 6. limit + * 7. find_nearest * * * Protobuf type {@code google.firestore.v1.StructuredQuery} @@ -13541,6 +13898,7 @@ public Builder mergeFrom( com.google.firestore.v1.StructuredQuery.Projection.Builder, com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder> selectBuilder_; + /** * * @@ -13559,6 +13917,7 @@ public Builder mergeFrom( public boolean hasSelect() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -13583,6 +13942,7 @@ public com.google.firestore.v1.StructuredQuery.Projection getSelect() { return selectBuilder_.getMessage(); } } + /** * * @@ -13609,6 +13969,7 @@ public Builder setSelect(com.google.firestore.v1.StructuredQuery.Projection valu onChanged(); return this; } + /** * * @@ -13633,6 +13994,7 @@ public Builder setSelect( onChanged(); return this; } + /** * * @@ -13664,6 +14026,7 @@ public Builder mergeSelect(com.google.firestore.v1.StructuredQuery.Projection va } return this; } + /** * * @@ -13687,6 +14050,7 @@ public Builder clearSelect() { onChanged(); return this; } + /** * * @@ -13705,6 +14069,7 @@ public com.google.firestore.v1.StructuredQuery.Projection.Builder getSelectBuild onChanged(); return getSelectFieldBuilder().getBuilder(); } + /** * * @@ -13727,6 +14092,7 @@ public com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder getSelectOrBu : select_; } } + /** * * @@ -13792,6 +14158,7 @@ private void ensureFromIsMutable() { return fromBuilder_.getMessageList(); } } + /** * * @@ -13808,6 +14175,7 @@ public int getFromCount() { return fromBuilder_.getCount(); } } + /** * * @@ -13824,6 +14192,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelector getFrom(int in return fromBuilder_.getMessage(index); } } + /** * * @@ -13847,6 +14216,7 @@ public Builder setFrom( } return this; } + /** * * @@ -13868,6 +14238,7 @@ public Builder setFrom( } return this; } + /** * * @@ -13890,6 +14261,7 @@ public Builder addFrom(com.google.firestore.v1.StructuredQuery.CollectionSelecto } return this; } + /** * * @@ -13913,6 +14285,7 @@ public Builder addFrom( } return this; } + /** * * @@ -13933,6 +14306,7 @@ public Builder addFrom( } return this; } + /** * * @@ -13954,6 +14328,7 @@ public Builder addFrom( } return this; } + /** * * @@ -13975,6 +14350,7 @@ public Builder addAllFrom( } return this; } + /** * * @@ -13994,6 +14370,7 @@ public Builder clearFrom() { } return this; } + /** * * @@ -14013,6 +14390,7 @@ public Builder removeFrom(int index) { } return this; } + /** * * @@ -14026,6 +14404,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelector.Builder getFro int index) { return getFromFieldBuilder().getBuilder(index); } + /** * * @@ -14043,6 +14422,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelectorOrBuilder getFr return fromBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -14061,6 +14441,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelectorOrBuilder getFr return java.util.Collections.unmodifiableList(from_); } } + /** * * @@ -14075,6 +14456,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelector.Builder addFro .addBuilder( com.google.firestore.v1.StructuredQuery.CollectionSelector.getDefaultInstance()); } + /** * * @@ -14091,6 +14473,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelector.Builder addFro index, com.google.firestore.v1.StructuredQuery.CollectionSelector.getDefaultInstance()); } + /** * * @@ -14128,6 +14511,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelector.Builder addFro com.google.firestore.v1.StructuredQuery.Filter.Builder, com.google.firestore.v1.StructuredQuery.FilterOrBuilder> whereBuilder_; + /** * * @@ -14142,6 +14526,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelector.Builder addFro public boolean hasWhere() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -14162,6 +14547,7 @@ public com.google.firestore.v1.StructuredQuery.Filter getWhere() { return whereBuilder_.getMessage(); } } + /** * * @@ -14184,6 +14570,7 @@ public Builder setWhere(com.google.firestore.v1.StructuredQuery.Filter value) { onChanged(); return this; } + /** * * @@ -14204,6 +14591,7 @@ public Builder setWhere( onChanged(); return this; } + /** * * @@ -14231,6 +14619,7 @@ public Builder mergeWhere(com.google.firestore.v1.StructuredQuery.Filter value) } return this; } + /** * * @@ -14250,6 +14639,7 @@ public Builder clearWhere() { onChanged(); return this; } + /** * * @@ -14264,6 +14654,7 @@ public com.google.firestore.v1.StructuredQuery.Filter.Builder getWhereBuilder() onChanged(); return getWhereFieldBuilder().getBuilder(); } + /** * * @@ -14282,6 +14673,7 @@ public com.google.firestore.v1.StructuredQuery.FilterOrBuilder getWhereOrBuilder : where_; } } + /** * * @@ -14359,6 +14751,7 @@ public java.util.List getOrderByL return orderByBuilder_.getMessageList(); } } + /** * * @@ -14394,6 +14787,7 @@ public int getOrderByCount() { return orderByBuilder_.getCount(); } } + /** * * @@ -14429,6 +14823,7 @@ public com.google.firestore.v1.StructuredQuery.Order getOrderBy(int index) { return orderByBuilder_.getMessage(index); } } + /** * * @@ -14470,6 +14865,7 @@ public Builder setOrderBy(int index, com.google.firestore.v1.StructuredQuery.Ord } return this; } + /** * * @@ -14509,6 +14905,7 @@ public Builder setOrderBy( } return this; } + /** * * @@ -14550,6 +14947,7 @@ public Builder addOrderBy(com.google.firestore.v1.StructuredQuery.Order value) { } return this; } + /** * * @@ -14591,6 +14989,7 @@ public Builder addOrderBy(int index, com.google.firestore.v1.StructuredQuery.Ord } return this; } + /** * * @@ -14630,6 +15029,7 @@ public Builder addOrderBy( } return this; } + /** * * @@ -14669,6 +15069,7 @@ public Builder addOrderBy( } return this; } + /** * * @@ -14708,6 +15109,7 @@ public Builder addAllOrderBy( } return this; } + /** * * @@ -14746,6 +15148,7 @@ public Builder clearOrderBy() { } return this; } + /** * * @@ -14784,6 +15187,7 @@ public Builder removeOrderBy(int index) { } return this; } + /** * * @@ -14815,6 +15219,7 @@ public Builder removeOrderBy(int index) { public com.google.firestore.v1.StructuredQuery.Order.Builder getOrderByBuilder(int index) { return getOrderByFieldBuilder().getBuilder(index); } + /** * * @@ -14850,6 +15255,7 @@ public com.google.firestore.v1.StructuredQuery.OrderOrBuilder getOrderByOrBuilde return orderByBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -14886,6 +15292,7 @@ public com.google.firestore.v1.StructuredQuery.OrderOrBuilder getOrderByOrBuilde return java.util.Collections.unmodifiableList(orderBy_); } } + /** * * @@ -14918,6 +15325,7 @@ public com.google.firestore.v1.StructuredQuery.Order.Builder addOrderByBuilder() return getOrderByFieldBuilder() .addBuilder(com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance()); } + /** * * @@ -14950,6 +15358,7 @@ public com.google.firestore.v1.StructuredQuery.Order.Builder addOrderByBuilder(i return getOrderByFieldBuilder() .addBuilder(index, com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance()); } + /** * * @@ -15006,6 +15415,7 @@ public com.google.firestore.v1.StructuredQuery.Order.Builder addOrderByBuilder(i com.google.firestore.v1.Cursor.Builder, com.google.firestore.v1.CursorOrBuilder> startAtBuilder_; + /** * * @@ -15050,6 +15460,7 @@ public com.google.firestore.v1.StructuredQuery.Order.Builder addOrderByBuilder(i public boolean hasStartAt() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -15098,6 +15509,7 @@ public com.google.firestore.v1.Cursor getStartAt() { return startAtBuilder_.getMessage(); } } + /** * * @@ -15150,6 +15562,7 @@ public Builder setStartAt(com.google.firestore.v1.Cursor value) { onChanged(); return this; } + /** * * @@ -15199,6 +15612,7 @@ public Builder setStartAt(com.google.firestore.v1.Cursor.Builder builderForValue onChanged(); return this; } + /** * * @@ -15256,6 +15670,7 @@ public Builder mergeStartAt(com.google.firestore.v1.Cursor value) { } return this; } + /** * * @@ -15305,6 +15720,7 @@ public Builder clearStartAt() { onChanged(); return this; } + /** * * @@ -15349,6 +15765,7 @@ public com.google.firestore.v1.Cursor.Builder getStartAtBuilder() { onChanged(); return getStartAtFieldBuilder().getBuilder(); } + /** * * @@ -15395,6 +15812,7 @@ public com.google.firestore.v1.CursorOrBuilder getStartAtOrBuilder() { return startAt_ == null ? com.google.firestore.v1.Cursor.getDefaultInstance() : startAt_; } } + /** * * @@ -15457,6 +15875,7 @@ public com.google.firestore.v1.CursorOrBuilder getStartAtOrBuilder() { com.google.firestore.v1.Cursor.Builder, com.google.firestore.v1.CursorOrBuilder> endAtBuilder_; + /** * * @@ -15479,6 +15898,7 @@ public com.google.firestore.v1.CursorOrBuilder getStartAtOrBuilder() { public boolean hasEndAt() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -15505,6 +15925,7 @@ public com.google.firestore.v1.Cursor getEndAt() { return endAtBuilder_.getMessage(); } } + /** * * @@ -15535,6 +15956,7 @@ public Builder setEndAt(com.google.firestore.v1.Cursor value) { onChanged(); return this; } + /** * * @@ -15562,6 +15984,7 @@ public Builder setEndAt(com.google.firestore.v1.Cursor.Builder builderForValue) onChanged(); return this; } + /** * * @@ -15597,6 +16020,7 @@ public Builder mergeEndAt(com.google.firestore.v1.Cursor value) { } return this; } + /** * * @@ -15624,6 +16048,7 @@ public Builder clearEndAt() { onChanged(); return this; } + /** * * @@ -15646,6 +16071,7 @@ public com.google.firestore.v1.Cursor.Builder getEndAtBuilder() { onChanged(); return getEndAtFieldBuilder().getBuilder(); } + /** * * @@ -15670,6 +16096,7 @@ public com.google.firestore.v1.CursorOrBuilder getEndAtOrBuilder() { return endAt_ == null ? com.google.firestore.v1.Cursor.getDefaultInstance() : endAt_; } } + /** * * @@ -15705,6 +16132,7 @@ public com.google.firestore.v1.CursorOrBuilder getEndAtOrBuilder() { } private int offset_; + /** * * @@ -15727,6 +16155,7 @@ public com.google.firestore.v1.CursorOrBuilder getEndAtOrBuilder() { public int getOffset() { return offset_; } + /** * * @@ -15753,6 +16182,7 @@ public Builder setOffset(int value) { onChanged(); return this; } + /** * * @@ -15784,6 +16214,7 @@ public Builder clearOffset() { com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** * * @@ -15804,6 +16235,7 @@ public Builder clearOffset() { public boolean hasLimit() { return ((bitField0_ & 0x00000080) != 0); } + /** * * @@ -15828,6 +16260,7 @@ public com.google.protobuf.Int32Value getLimit() { return limitBuilder_.getMessage(); } } + /** * * @@ -15856,6 +16289,7 @@ public Builder setLimit(com.google.protobuf.Int32Value value) { onChanged(); return this; } + /** * * @@ -15881,6 +16315,7 @@ public Builder setLimit(com.google.protobuf.Int32Value.Builder builderForValue) onChanged(); return this; } + /** * * @@ -15914,6 +16349,7 @@ public Builder mergeLimit(com.google.protobuf.Int32Value value) { } return this; } + /** * * @@ -15939,6 +16375,7 @@ public Builder clearLimit() { onChanged(); return this; } + /** * * @@ -15959,6 +16396,7 @@ public com.google.protobuf.Int32Value.Builder getLimitBuilder() { onChanged(); return getLimitFieldBuilder().getBuilder(); } + /** * * @@ -15981,6 +16419,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; } } + /** * * @@ -16019,6 +16458,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { com.google.firestore.v1.StructuredQuery.FindNearest.Builder, com.google.firestore.v1.StructuredQuery.FindNearestOrBuilder> findNearestBuilder_; + /** * * @@ -16039,6 +16479,7 @@ public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { public boolean hasFindNearest() { return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -16065,6 +16506,7 @@ public com.google.firestore.v1.StructuredQuery.FindNearest getFindNearest() { return findNearestBuilder_.getMessage(); } } + /** * * @@ -16093,6 +16535,7 @@ public Builder setFindNearest(com.google.firestore.v1.StructuredQuery.FindNeares onChanged(); return this; } + /** * * @@ -16119,6 +16562,7 @@ public Builder setFindNearest( onChanged(); return this; } + /** * * @@ -16153,6 +16597,7 @@ public Builder mergeFindNearest(com.google.firestore.v1.StructuredQuery.FindNear } return this; } + /** * * @@ -16178,6 +16623,7 @@ public Builder clearFindNearest() { onChanged(); return this; } + /** * * @@ -16198,6 +16644,7 @@ public com.google.firestore.v1.StructuredQuery.FindNearest.Builder getFindNeares onChanged(); return getFindNearestFieldBuilder().getBuilder(); } + /** * * @@ -16222,6 +16669,7 @@ public com.google.firestore.v1.StructuredQuery.FindNearestOrBuilder getFindNeare : findNearest_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQueryOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQueryOrBuilder.java index 12358c5cc..861e20eee 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQueryOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQueryOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/query.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface StructuredQueryOrBuilder @@ -40,6 +40,7 @@ public interface StructuredQueryOrBuilder * @return Whether the select field is set. */ boolean hasSelect(); + /** * * @@ -56,6 +57,7 @@ public interface StructuredQueryOrBuilder * @return The select. */ com.google.firestore.v1.StructuredQuery.Projection getSelect(); + /** * * @@ -81,6 +83,7 @@ public interface StructuredQueryOrBuilder * repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ java.util.List getFromList(); + /** * * @@ -91,6 +94,7 @@ public interface StructuredQueryOrBuilder * repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ com.google.firestore.v1.StructuredQuery.CollectionSelector getFrom(int index); + /** * * @@ -101,6 +105,7 @@ public interface StructuredQueryOrBuilder * repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ int getFromCount(); + /** * * @@ -112,6 +117,7 @@ public interface StructuredQueryOrBuilder */ java.util.List getFromOrBuilderList(); + /** * * @@ -135,6 +141,7 @@ public interface StructuredQueryOrBuilder * @return Whether the where field is set. */ boolean hasWhere(); + /** * * @@ -147,6 +154,7 @@ public interface StructuredQueryOrBuilder * @return The where. */ com.google.firestore.v1.StructuredQuery.Filter getWhere(); + /** * * @@ -187,6 +195,7 @@ public interface StructuredQueryOrBuilder * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ java.util.List getOrderByList(); + /** * * @@ -216,6 +225,7 @@ public interface StructuredQueryOrBuilder * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ com.google.firestore.v1.StructuredQuery.Order getOrderBy(int index); + /** * * @@ -245,6 +255,7 @@ public interface StructuredQueryOrBuilder * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ int getOrderByCount(); + /** * * @@ -275,6 +286,7 @@ public interface StructuredQueryOrBuilder */ java.util.List getOrderByOrBuilderList(); + /** * * @@ -347,6 +359,7 @@ public interface StructuredQueryOrBuilder * @return Whether the startAt field is set. */ boolean hasStartAt(); + /** * * @@ -389,6 +402,7 @@ public interface StructuredQueryOrBuilder * @return The startAt. */ com.google.firestore.v1.Cursor getStartAt(); + /** * * @@ -450,6 +464,7 @@ public interface StructuredQueryOrBuilder * @return Whether the endAt field is set. */ boolean hasEndAt(); + /** * * @@ -470,6 +485,7 @@ public interface StructuredQueryOrBuilder * @return The endAt. */ com.google.firestore.v1.Cursor getEndAt(); + /** * * @@ -527,6 +543,7 @@ public interface StructuredQueryOrBuilder * @return Whether the limit field is set. */ boolean hasLimit(); + /** * * @@ -545,6 +562,7 @@ public interface StructuredQueryOrBuilder * @return The limit. */ com.google.protobuf.Int32Value getLimit(); + /** * * @@ -580,6 +598,7 @@ public interface StructuredQueryOrBuilder * @return Whether the findNearest field is set. */ boolean hasFindNearest(); + /** * * @@ -598,6 +617,7 @@ public interface StructuredQueryOrBuilder * @return The findNearest. */ com.google.firestore.v1.StructuredQuery.FindNearest getFindNearest(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java index 6ce9d9d50..1c8596155 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class Target extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.Target) TargetOrBuilder { private static final long serialVersionUID = 0L; + // Use Target.newBuilder() to construct. private Target(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -80,6 +81,7 @@ public interface DocumentsTargetOrBuilder * @return A list containing the documents. */ java.util.List getDocumentsList(); + /** * * @@ -95,6 +97,7 @@ public interface DocumentsTargetOrBuilder * @return The count of documents. */ int getDocumentsCount(); + /** * * @@ -111,6 +114,7 @@ public interface DocumentsTargetOrBuilder * @return The documents at the given index. */ java.lang.String getDocuments(int index); + /** * * @@ -128,6 +132,7 @@ public interface DocumentsTargetOrBuilder */ com.google.protobuf.ByteString getDocumentsBytes(int index); } + /** * * @@ -142,6 +147,7 @@ public static final class DocumentsTarget extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.firestore.v1.Target.DocumentsTarget) DocumentsTargetOrBuilder { private static final long serialVersionUID = 0L; + // Use DocumentsTarget.newBuilder() to construct. private DocumentsTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -177,6 +183,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList documents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -194,6 +201,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getDocumentsList() { return documents_; } + /** * * @@ -211,6 +219,7 @@ public com.google.protobuf.ProtocolStringList getDocumentsList() { public int getDocumentsCount() { return documents_.size(); } + /** * * @@ -229,6 +238,7 @@ public int getDocumentsCount() { public java.lang.String getDocuments(int index) { return documents_.get(index); } + /** * * @@ -415,6 +425,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -617,6 +628,7 @@ private void ensureDocumentsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -635,6 +647,7 @@ public com.google.protobuf.ProtocolStringList getDocumentsList() { documents_.makeImmutable(); return documents_; } + /** * * @@ -652,6 +665,7 @@ public com.google.protobuf.ProtocolStringList getDocumentsList() { public int getDocumentsCount() { return documents_.size(); } + /** * * @@ -670,6 +684,7 @@ public int getDocumentsCount() { public java.lang.String getDocuments(int index) { return documents_.get(index); } + /** * * @@ -688,6 +703,7 @@ public java.lang.String getDocuments(int index) { public com.google.protobuf.ByteString getDocumentsBytes(int index) { return documents_.getByteString(index); } + /** * * @@ -714,6 +730,7 @@ public Builder setDocuments(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -739,6 +756,7 @@ public Builder addDocuments(java.lang.String value) { onChanged(); return this; } + /** * * @@ -761,6 +779,7 @@ public Builder addAllDocuments(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -782,6 +801,7 @@ public Builder clearDocuments() { onChanged(); return this; } + /** * * @@ -895,6 +915,7 @@ public interface QueryTargetOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -925,6 +946,7 @@ public interface QueryTargetOrBuilder * @return Whether the structuredQuery field is set. */ boolean hasStructuredQuery(); + /** * * @@ -937,6 +959,7 @@ public interface QueryTargetOrBuilder * @return The structuredQuery. */ com.google.firestore.v1.StructuredQuery getStructuredQuery(); + /** * * @@ -950,6 +973,7 @@ public interface QueryTargetOrBuilder com.google.firestore.v1.Target.QueryTarget.QueryTypeCase getQueryTypeCase(); } + /** * * @@ -964,6 +988,7 @@ public static final class QueryTarget extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.Target.QueryTarget) QueryTargetOrBuilder { private static final long serialVersionUID = 0L; + // Use QueryTarget.newBuilder() to construct. private QueryTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1010,6 +1035,7 @@ public enum QueryTypeCase private QueryTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -1044,6 +1070,7 @@ public QueryTypeCase getQueryTypeCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -1072,6 +1099,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -1102,6 +1130,7 @@ public com.google.protobuf.ByteString getParentBytes() { } public static final int STRUCTURED_QUERY_FIELD_NUMBER = 2; + /** * * @@ -1117,6 +1146,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -1135,6 +1165,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { } return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } + /** * * @@ -1336,6 +1367,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1568,6 +1600,7 @@ public Builder clearQueryType() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -1595,6 +1628,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -1622,6 +1656,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1648,6 +1683,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1670,6 +1706,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -1703,6 +1740,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.StructuredQuery.Builder, com.google.firestore.v1.StructuredQueryOrBuilder> structuredQueryBuilder_; + /** * * @@ -1718,6 +1756,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } + /** * * @@ -1743,6 +1782,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -1765,6 +1805,7 @@ public Builder setStructuredQuery(com.google.firestore.v1.StructuredQuery value) queryTypeCase_ = 2; return this; } + /** * * @@ -1785,6 +1826,7 @@ public Builder setStructuredQuery( queryTypeCase_ = 2; return this; } + /** * * @@ -1817,6 +1859,7 @@ public Builder mergeStructuredQuery(com.google.firestore.v1.StructuredQuery valu queryTypeCase_ = 2; return this; } + /** * * @@ -1842,6 +1885,7 @@ public Builder clearStructuredQuery() { } return this; } + /** * * @@ -1854,6 +1898,7 @@ public Builder clearStructuredQuery() { public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder() { return getStructuredQueryFieldBuilder().getBuilder(); } + /** * * @@ -1874,6 +1919,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); } } + /** * * @@ -1989,6 +2035,7 @@ public enum TargetTypeCase private TargetTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2038,6 +2085,7 @@ public enum ResumeTypeCase private ResumeTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2071,6 +2119,7 @@ public ResumeTypeCase getResumeTypeCase() { } public static final int QUERY_FIELD_NUMBER = 2; + /** * * @@ -2086,6 +2135,7 @@ public ResumeTypeCase getResumeTypeCase() { public boolean hasQuery() { return targetTypeCase_ == 2; } + /** * * @@ -2104,6 +2154,7 @@ public com.google.firestore.v1.Target.QueryTarget getQuery() { } return com.google.firestore.v1.Target.QueryTarget.getDefaultInstance(); } + /** * * @@ -2122,6 +2173,7 @@ public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { } public static final int DOCUMENTS_FIELD_NUMBER = 3; + /** * * @@ -2137,6 +2189,7 @@ public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { public boolean hasDocuments() { return targetTypeCase_ == 3; } + /** * * @@ -2155,6 +2208,7 @@ public com.google.firestore.v1.Target.DocumentsTarget getDocuments() { } return com.google.firestore.v1.Target.DocumentsTarget.getDefaultInstance(); } + /** * * @@ -2173,6 +2227,7 @@ public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBui } public static final int RESUME_TOKEN_FIELD_NUMBER = 4; + /** * * @@ -2191,6 +2246,7 @@ public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBui public boolean hasResumeToken() { return resumeTypeCase_ == 4; } + /** * * @@ -2214,6 +2270,7 @@ public com.google.protobuf.ByteString getResumeToken() { } public static final int READ_TIME_FIELD_NUMBER = 11; + /** * * @@ -2231,6 +2288,7 @@ public com.google.protobuf.ByteString getResumeToken() { public boolean hasReadTime() { return resumeTypeCase_ == 11; } + /** * * @@ -2251,6 +2309,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -2272,6 +2331,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public static final int TARGET_ID_FIELD_NUMBER = 5; private int targetId_ = 0; + /** * * @@ -2306,6 +2366,7 @@ public int getTargetId() { public static final int ONCE_FIELD_NUMBER = 6; private boolean once_ = false; + /** * * @@ -2324,6 +2385,7 @@ public boolean getOnce() { public static final int EXPECTED_COUNT_FIELD_NUMBER = 12; private com.google.protobuf.Int32Value expectedCount_; + /** * * @@ -2344,6 +2406,7 @@ public boolean getOnce() { public boolean hasExpectedCount() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2366,6 +2429,7 @@ public com.google.protobuf.Int32Value getExpectedCount() { ? com.google.protobuf.Int32Value.getDefaultInstance() : expectedCount_; } + /** * * @@ -2645,6 +2709,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -2985,6 +3050,7 @@ public Builder clearResumeType() { com.google.firestore.v1.Target.QueryTarget.Builder, com.google.firestore.v1.Target.QueryTargetOrBuilder> queryBuilder_; + /** * * @@ -3000,6 +3066,7 @@ public Builder clearResumeType() { public boolean hasQuery() { return targetTypeCase_ == 2; } + /** * * @@ -3025,6 +3092,7 @@ public com.google.firestore.v1.Target.QueryTarget getQuery() { return com.google.firestore.v1.Target.QueryTarget.getDefaultInstance(); } } + /** * * @@ -3047,6 +3115,7 @@ public Builder setQuery(com.google.firestore.v1.Target.QueryTarget value) { targetTypeCase_ = 2; return this; } + /** * * @@ -3066,6 +3135,7 @@ public Builder setQuery(com.google.firestore.v1.Target.QueryTarget.Builder build targetTypeCase_ = 2; return this; } + /** * * @@ -3098,6 +3168,7 @@ public Builder mergeQuery(com.google.firestore.v1.Target.QueryTarget value) { targetTypeCase_ = 2; return this; } + /** * * @@ -3123,6 +3194,7 @@ public Builder clearQuery() { } return this; } + /** * * @@ -3135,6 +3207,7 @@ public Builder clearQuery() { public com.google.firestore.v1.Target.QueryTarget.Builder getQueryBuilder() { return getQueryFieldBuilder().getBuilder(); } + /** * * @@ -3155,6 +3228,7 @@ public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { return com.google.firestore.v1.Target.QueryTarget.getDefaultInstance(); } } + /** * * @@ -3193,6 +3267,7 @@ public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { com.google.firestore.v1.Target.DocumentsTarget.Builder, com.google.firestore.v1.Target.DocumentsTargetOrBuilder> documentsBuilder_; + /** * * @@ -3208,6 +3283,7 @@ public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { public boolean hasDocuments() { return targetTypeCase_ == 3; } + /** * * @@ -3233,6 +3309,7 @@ public com.google.firestore.v1.Target.DocumentsTarget getDocuments() { return com.google.firestore.v1.Target.DocumentsTarget.getDefaultInstance(); } } + /** * * @@ -3255,6 +3332,7 @@ public Builder setDocuments(com.google.firestore.v1.Target.DocumentsTarget value targetTypeCase_ = 3; return this; } + /** * * @@ -3275,6 +3353,7 @@ public Builder setDocuments( targetTypeCase_ = 3; return this; } + /** * * @@ -3307,6 +3386,7 @@ public Builder mergeDocuments(com.google.firestore.v1.Target.DocumentsTarget val targetTypeCase_ = 3; return this; } + /** * * @@ -3332,6 +3412,7 @@ public Builder clearDocuments() { } return this; } + /** * * @@ -3344,6 +3425,7 @@ public Builder clearDocuments() { public com.google.firestore.v1.Target.DocumentsTarget.Builder getDocumentsBuilder() { return getDocumentsFieldBuilder().getBuilder(); } + /** * * @@ -3364,6 +3446,7 @@ public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBui return com.google.firestore.v1.Target.DocumentsTarget.getDefaultInstance(); } } + /** * * @@ -3414,6 +3497,7 @@ public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBui public boolean hasResumeToken() { return resumeTypeCase_ == 4; } + /** * * @@ -3434,6 +3518,7 @@ public com.google.protobuf.ByteString getResumeToken() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -3458,6 +3543,7 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -3486,6 +3572,7 @@ public Builder clearResumeToken() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -3503,6 +3590,7 @@ public Builder clearResumeToken() { public boolean hasReadTime() { return resumeTypeCase_ == 11; } + /** * * @@ -3530,6 +3618,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -3554,6 +3643,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { resumeTypeCase_ = 11; return this; } + /** * * @@ -3575,6 +3665,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue resumeTypeCase_ = 11; return this; } + /** * * @@ -3608,6 +3699,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { resumeTypeCase_ = 11; return this; } + /** * * @@ -3635,6 +3727,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -3649,6 +3742,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -3671,6 +3765,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -3705,6 +3800,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { } private int targetId_; + /** * * @@ -3736,6 +3832,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { public int getTargetId() { return targetId_; } + /** * * @@ -3771,6 +3868,7 @@ public Builder setTargetId(int value) { onChanged(); return this; } + /** * * @@ -3806,6 +3904,7 @@ public Builder clearTargetId() { } private boolean once_; + /** * * @@ -3821,6 +3920,7 @@ public Builder clearTargetId() { public boolean getOnce() { return once_; } + /** * * @@ -3840,6 +3940,7 @@ public Builder setOnce(boolean value) { onChanged(); return this; } + /** * * @@ -3864,6 +3965,7 @@ public Builder clearOnce() { com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> expectedCountBuilder_; + /** * * @@ -3883,6 +3985,7 @@ public Builder clearOnce() { public boolean hasExpectedCount() { return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -3908,6 +4011,7 @@ public com.google.protobuf.Int32Value getExpectedCount() { return expectedCountBuilder_.getMessage(); } } + /** * * @@ -3935,6 +4039,7 @@ public Builder setExpectedCount(com.google.protobuf.Int32Value value) { onChanged(); return this; } + /** * * @@ -3959,6 +4064,7 @@ public Builder setExpectedCount(com.google.protobuf.Int32Value.Builder builderFo onChanged(); return this; } + /** * * @@ -3991,6 +4097,7 @@ public Builder mergeExpectedCount(com.google.protobuf.Int32Value value) { } return this; } + /** * * @@ -4015,6 +4122,7 @@ public Builder clearExpectedCount() { onChanged(); return this; } + /** * * @@ -4034,6 +4142,7 @@ public com.google.protobuf.Int32Value.Builder getExpectedCountBuilder() { onChanged(); return getExpectedCountFieldBuilder().getBuilder(); } + /** * * @@ -4057,6 +4166,7 @@ public com.google.protobuf.Int32ValueOrBuilder getExpectedCountOrBuilder() { : expectedCount_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java index 7b8339892..514527597 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class TargetChange extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.TargetChange) TargetChangeOrBuilder { private static final long serialVersionUID = 0L; + // Use TargetChange.newBuilder() to construct. private TargetChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -149,6 +150,7 @@ public enum TargetChangeType implements com.google.protobuf.ProtocolMessageEnum * NO_CHANGE = 0; */ public static final int NO_CHANGE_VALUE = 0; + /** * * @@ -159,6 +161,7 @@ public enum TargetChangeType implements com.google.protobuf.ProtocolMessageEnum * ADD = 1; */ public static final int ADD_VALUE = 1; + /** * * @@ -169,6 +172,7 @@ public enum TargetChangeType implements com.google.protobuf.ProtocolMessageEnum * REMOVE = 2; */ public static final int REMOVE_VALUE = 2; + /** * * @@ -186,6 +190,7 @@ public enum TargetChangeType implements com.google.protobuf.ProtocolMessageEnum * CURRENT = 3; */ public static final int CURRENT_VALUE = 3; + /** * * @@ -293,6 +298,7 @@ private TargetChangeType(int value) { private int bitField0_; public static final int TARGET_CHANGE_TYPE_FIELD_NUMBER = 1; private int targetChangeType_ = 0; + /** * * @@ -308,6 +314,7 @@ private TargetChangeType(int value) { public int getTargetChangeTypeValue() { return targetChangeType_; } + /** * * @@ -332,6 +339,7 @@ public com.google.firestore.v1.TargetChange.TargetChangeType getTargetChangeType @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList targetIds_ = emptyIntList(); + /** * * @@ -351,6 +359,7 @@ public com.google.firestore.v1.TargetChange.TargetChangeType getTargetChangeType public java.util.List getTargetIdsList() { return targetIds_; } + /** * * @@ -369,6 +378,7 @@ public java.util.List getTargetIdsList() { public int getTargetIdsCount() { return targetIds_.size(); } + /** * * @@ -393,6 +403,7 @@ public int getTargetIds(int index) { public static final int CAUSE_FIELD_NUMBER = 3; private com.google.rpc.Status cause_; + /** * * @@ -408,6 +419,7 @@ public int getTargetIds(int index) { public boolean hasCause() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -423,6 +435,7 @@ public boolean hasCause() { public com.google.rpc.Status getCause() { return cause_ == null ? com.google.rpc.Status.getDefaultInstance() : cause_; } + /** * * @@ -439,6 +452,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { public static final int RESUME_TOKEN_FIELD_NUMBER = 4; private com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -460,6 +474,7 @@ public com.google.protobuf.ByteString getResumeToken() { public static final int READ_TIME_FIELD_NUMBER = 6; private com.google.protobuf.Timestamp readTime_; + /** * * @@ -484,6 +499,7 @@ public com.google.protobuf.ByteString getResumeToken() { public boolean hasReadTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -508,6 +524,7 @@ public boolean hasReadTime() { public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } + /** * * @@ -753,6 +770,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1028,6 +1046,7 @@ public Builder mergeFrom( private int bitField0_; private int targetChangeType_ = 0; + /** * * @@ -1043,6 +1062,7 @@ public Builder mergeFrom( public int getTargetChangeTypeValue() { return targetChangeType_; } + /** * * @@ -1061,6 +1081,7 @@ public Builder setTargetChangeTypeValue(int value) { onChanged(); return this; } + /** * * @@ -1080,6 +1101,7 @@ public com.google.firestore.v1.TargetChange.TargetChangeType getTargetChangeType ? com.google.firestore.v1.TargetChange.TargetChangeType.UNRECOGNIZED : result; } + /** * * @@ -1102,6 +1124,7 @@ public Builder setTargetChangeType( onChanged(); return this; } + /** * * @@ -1128,6 +1151,7 @@ private void ensureTargetIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1147,6 +1171,7 @@ public java.util.List getTargetIdsList() { targetIds_.makeImmutable(); return targetIds_; } + /** * * @@ -1165,6 +1190,7 @@ public java.util.List getTargetIdsList() { public int getTargetIdsCount() { return targetIds_.size(); } + /** * * @@ -1184,6 +1210,7 @@ public int getTargetIdsCount() { public int getTargetIds(int index) { return targetIds_.getInt(index); } + /** * * @@ -1209,6 +1236,7 @@ public Builder setTargetIds(int index, int value) { onChanged(); return this; } + /** * * @@ -1233,6 +1261,7 @@ public Builder addTargetIds(int value) { onChanged(); return this; } + /** * * @@ -1256,6 +1285,7 @@ public Builder addAllTargetIds(java.lang.Iterable v onChanged(); return this; } + /** * * @@ -1282,6 +1312,7 @@ public Builder clearTargetIds() { private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> causeBuilder_; + /** * * @@ -1296,6 +1327,7 @@ public Builder clearTargetIds() { public boolean hasCause() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1314,6 +1346,7 @@ public com.google.rpc.Status getCause() { return causeBuilder_.getMessage(); } } + /** * * @@ -1336,6 +1369,7 @@ public Builder setCause(com.google.rpc.Status value) { onChanged(); return this; } + /** * * @@ -1355,6 +1389,7 @@ public Builder setCause(com.google.rpc.Status.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -1382,6 +1417,7 @@ public Builder mergeCause(com.google.rpc.Status value) { } return this; } + /** * * @@ -1401,6 +1437,7 @@ public Builder clearCause() { onChanged(); return this; } + /** * * @@ -1415,6 +1452,7 @@ public com.google.rpc.Status.Builder getCauseBuilder() { onChanged(); return getCauseFieldBuilder().getBuilder(); } + /** * * @@ -1431,6 +1469,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { return cause_ == null ? com.google.rpc.Status.getDefaultInstance() : cause_; } } + /** * * @@ -1455,6 +1494,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { } private com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1473,6 +1513,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } + /** * * @@ -1497,6 +1538,7 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1524,6 +1566,7 @@ public Builder clearResumeToken() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1547,6 +1590,7 @@ public Builder clearResumeToken() { public boolean hasReadTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1574,6 +1618,7 @@ public com.google.protobuf.Timestamp getReadTime() { return readTimeBuilder_.getMessage(); } } + /** * * @@ -1605,6 +1650,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1633,6 +1679,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue onChanged(); return this; } + /** * * @@ -1669,6 +1716,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1697,6 +1745,7 @@ public Builder clearReadTime() { onChanged(); return this; } + /** * * @@ -1720,6 +1769,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1745,6 +1795,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java index 6e8591be1..c04954829 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface TargetChangeOrBuilder @@ -36,6 +36,7 @@ public interface TargetChangeOrBuilder * @return The enum numeric value on the wire for targetChangeType. */ int getTargetChangeTypeValue(); + /** * * @@ -65,6 +66,7 @@ public interface TargetChangeOrBuilder * @return A list containing the targetIds. */ java.util.List getTargetIdsList(); + /** * * @@ -81,6 +83,7 @@ public interface TargetChangeOrBuilder * @return The count of targetIds. */ int getTargetIdsCount(); + /** * * @@ -111,6 +114,7 @@ public interface TargetChangeOrBuilder * @return Whether the cause field is set. */ boolean hasCause(); + /** * * @@ -123,6 +127,7 @@ public interface TargetChangeOrBuilder * @return The cause. */ com.google.rpc.Status getCause(); + /** * * @@ -171,6 +176,7 @@ public interface TargetChangeOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -192,6 +198,7 @@ public interface TargetChangeOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java index 833c7c5e1..65ce3f7f8 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface TargetOrBuilder @@ -36,6 +36,7 @@ public interface TargetOrBuilder * @return Whether the query field is set. */ boolean hasQuery(); + /** * * @@ -48,6 +49,7 @@ public interface TargetOrBuilder * @return The query. */ com.google.firestore.v1.Target.QueryTarget getQuery(); + /** * * @@ -71,6 +73,7 @@ public interface TargetOrBuilder * @return Whether the documents field is set. */ boolean hasDocuments(); + /** * * @@ -83,6 +86,7 @@ public interface TargetOrBuilder * @return The documents. */ com.google.firestore.v1.Target.DocumentsTarget getDocuments(); + /** * * @@ -109,6 +113,7 @@ public interface TargetOrBuilder * @return Whether the resumeToken field is set. */ boolean hasResumeToken(); + /** * * @@ -139,6 +144,7 @@ public interface TargetOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -153,6 +159,7 @@ public interface TargetOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * @@ -225,6 +232,7 @@ public interface TargetOrBuilder * @return Whether the expectedCount field is set. */ boolean hasExpectedCount(); + /** * * @@ -242,6 +250,7 @@ public interface TargetOrBuilder * @return The expectedCount. */ com.google.protobuf.Int32Value getExpectedCount(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java index 17e8f10de..6469fc0ff 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class TransactionOptions extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.firestore.v1.TransactionOptions) TransactionOptionsOrBuilder { private static final long serialVersionUID = 0L; + // Use TransactionOptions.newBuilder() to construct. private TransactionOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -79,6 +80,7 @@ public interface ReadWriteOrBuilder */ com.google.protobuf.ByteString getRetryTransaction(); } + /** * * @@ -96,6 +98,7 @@ public static final class ReadWrite extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.firestore.v1.TransactionOptions.ReadWrite) ReadWriteOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadWrite.newBuilder() to construct. private ReadWrite(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -128,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int RETRY_TRANSACTION_FIELD_NUMBER = 1; private com.google.protobuf.ByteString retryTransaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -305,6 +309,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -494,6 +499,7 @@ public Builder mergeFrom( private com.google.protobuf.ByteString retryTransaction_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -509,6 +515,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getRetryTransaction() { return retryTransaction_; } + /** * * @@ -530,6 +537,7 @@ public Builder setRetryTransaction(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -633,6 +641,7 @@ public interface ReadOnlyOrBuilder * @return Whether the readTime field is set. */ boolean hasReadTime(); + /** * * @@ -649,6 +658,7 @@ public interface ReadOnlyOrBuilder * @return The readTime. */ com.google.protobuf.Timestamp getReadTime(); + /** * * @@ -667,6 +677,7 @@ public interface ReadOnlyOrBuilder com.google.firestore.v1.TransactionOptions.ReadOnly.ConsistencySelectorCase getConsistencySelectorCase(); } + /** * * @@ -681,6 +692,7 @@ public static final class ReadOnly extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.firestore.v1.TransactionOptions.ReadOnly) ReadOnlyOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadOnly.newBuilder() to construct. private ReadOnly(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -725,6 +737,7 @@ public enum ConsistencySelectorCase private ConsistencySelectorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -756,6 +769,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { } public static final int READ_TIME_FIELD_NUMBER = 2; + /** * * @@ -775,6 +789,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { public boolean hasReadTime() { return consistencySelectorCase_ == 2; } + /** * * @@ -797,6 +812,7 @@ public com.google.protobuf.Timestamp getReadTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -994,6 +1010,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1215,6 +1232,7 @@ public Builder clearConsistencySelector() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** * * @@ -1234,6 +1252,7 @@ public Builder clearConsistencySelector() { public boolean hasReadTime() { return consistencySelectorCase_ == 2; } + /** * * @@ -1263,6 +1282,7 @@ public com.google.protobuf.Timestamp getReadTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1289,6 +1309,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 2; return this; } + /** * * @@ -1312,6 +1333,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue consistencySelectorCase_ = 2; return this; } + /** * * @@ -1348,6 +1370,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { consistencySelectorCase_ = 2; return this; } + /** * * @@ -1377,6 +1400,7 @@ public Builder clearReadTime() { } return this; } + /** * * @@ -1393,6 +1417,7 @@ public Builder clearReadTime() { public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { return getReadTimeFieldBuilder().getBuilder(); } + /** * * @@ -1417,6 +1442,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1535,6 +1561,7 @@ public enum ModeCase private ModeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -1568,6 +1595,7 @@ public ModeCase getModeCase() { } public static final int READ_ONLY_FIELD_NUMBER = 2; + /** * * @@ -1583,6 +1611,7 @@ public ModeCase getModeCase() { public boolean hasReadOnly() { return modeCase_ == 2; } + /** * * @@ -1601,6 +1630,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnly getReadOnly() { } return com.google.firestore.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } + /** * * @@ -1619,6 +1649,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyO } public static final int READ_WRITE_FIELD_NUMBER = 3; + /** * * @@ -1634,6 +1665,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyO public boolean hasReadWrite() { return modeCase_ == 3; } + /** * * @@ -1652,6 +1684,7 @@ public com.google.firestore.v1.TransactionOptions.ReadWrite getReadWrite() { } return com.google.firestore.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } + /** * * @@ -1858,6 +1891,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -2092,6 +2126,7 @@ public Builder clearMode() { com.google.firestore.v1.TransactionOptions.ReadOnly.Builder, com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder> readOnlyBuilder_; + /** * * @@ -2107,6 +2142,7 @@ public Builder clearMode() { public boolean hasReadOnly() { return modeCase_ == 2; } + /** * * @@ -2132,6 +2168,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnly getReadOnly() { return com.google.firestore.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } } + /** * * @@ -2154,6 +2191,7 @@ public Builder setReadOnly(com.google.firestore.v1.TransactionOptions.ReadOnly v modeCase_ = 2; return this; } + /** * * @@ -2174,6 +2212,7 @@ public Builder setReadOnly( modeCase_ = 2; return this; } + /** * * @@ -2206,6 +2245,7 @@ public Builder mergeReadOnly(com.google.firestore.v1.TransactionOptions.ReadOnly modeCase_ = 2; return this; } + /** * * @@ -2231,6 +2271,7 @@ public Builder clearReadOnly() { } return this; } + /** * * @@ -2243,6 +2284,7 @@ public Builder clearReadOnly() { public com.google.firestore.v1.TransactionOptions.ReadOnly.Builder getReadOnlyBuilder() { return getReadOnlyFieldBuilder().getBuilder(); } + /** * * @@ -2263,6 +2305,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyO return com.google.firestore.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } } + /** * * @@ -2301,6 +2344,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyO com.google.firestore.v1.TransactionOptions.ReadWrite.Builder, com.google.firestore.v1.TransactionOptions.ReadWriteOrBuilder> readWriteBuilder_; + /** * * @@ -2316,6 +2360,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyO public boolean hasReadWrite() { return modeCase_ == 3; } + /** * * @@ -2341,6 +2386,7 @@ public com.google.firestore.v1.TransactionOptions.ReadWrite getReadWrite() { return com.google.firestore.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } } + /** * * @@ -2363,6 +2409,7 @@ public Builder setReadWrite(com.google.firestore.v1.TransactionOptions.ReadWrite modeCase_ = 3; return this; } + /** * * @@ -2383,6 +2430,7 @@ public Builder setReadWrite( modeCase_ = 3; return this; } + /** * * @@ -2415,6 +2463,7 @@ public Builder mergeReadWrite(com.google.firestore.v1.TransactionOptions.ReadWri modeCase_ = 3; return this; } + /** * * @@ -2440,6 +2489,7 @@ public Builder clearReadWrite() { } return this; } + /** * * @@ -2452,6 +2502,7 @@ public Builder clearReadWrite() { public com.google.firestore.v1.TransactionOptions.ReadWrite.Builder getReadWriteBuilder() { return getReadWriteFieldBuilder().getBuilder(); } + /** * * @@ -2472,6 +2523,7 @@ public com.google.firestore.v1.TransactionOptions.ReadWriteOrBuilder getReadWrit return com.google.firestore.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptionsOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptionsOrBuilder.java index a5f8818c4..e9926b72e 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptionsOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptionsOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface TransactionOptionsOrBuilder @@ -36,6 +36,7 @@ public interface TransactionOptionsOrBuilder * @return Whether the readOnly field is set. */ boolean hasReadOnly(); + /** * * @@ -48,6 +49,7 @@ public interface TransactionOptionsOrBuilder * @return The readOnly. */ com.google.firestore.v1.TransactionOptions.ReadOnly getReadOnly(); + /** * * @@ -71,6 +73,7 @@ public interface TransactionOptionsOrBuilder * @return Whether the readWrite field is set. */ boolean hasReadWrite(); + /** * * @@ -83,6 +86,7 @@ public interface TransactionOptionsOrBuilder * @return The readWrite. */ com.google.firestore.v1.TransactionOptions.ReadWrite getReadWrite(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java index c11a27c47..18ce0f961 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -34,6 +34,7 @@ public final class UpdateDocumentRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.firestore.v1.UpdateDocumentRequest) UpdateDocumentRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateDocumentRequest.newBuilder() to construct. private UpdateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int DOCUMENT_FIELD_NUMBER = 1; private com.google.firestore.v1.Document document_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasDocument() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +102,7 @@ public boolean hasDocument() { public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } + /** * * @@ -117,6 +121,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.firestore.v1.DocumentMask updateMask_; + /** * * @@ -138,6 +143,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -161,6 +167,7 @@ public com.google.firestore.v1.DocumentMask getUpdateMask() { ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : updateMask_; } + /** * * @@ -185,6 +192,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { public static final int MASK_FIELD_NUMBER = 3; private com.google.firestore.v1.DocumentMask mask_; + /** * * @@ -203,6 +211,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { public boolean hasMask() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -221,6 +230,7 @@ public boolean hasMask() { public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } + /** * * @@ -240,6 +250,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public static final int CURRENT_DOCUMENT_FIELD_NUMBER = 4; private com.google.firestore.v1.Precondition currentDocument_; + /** * * @@ -256,6 +267,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasCurrentDocument() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -274,6 +286,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { ? com.google.firestore.v1.Precondition.getDefaultInstance() : currentDocument_; } + /** * * @@ -497,6 +510,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -758,6 +772,7 @@ public Builder mergeFrom( com.google.firestore.v1.Document.Builder, com.google.firestore.v1.DocumentOrBuilder> documentBuilder_; + /** * * @@ -774,6 +789,7 @@ public Builder mergeFrom( public boolean hasDocument() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -796,6 +812,7 @@ public com.google.firestore.v1.Document getDocument() { return documentBuilder_.getMessage(); } } + /** * * @@ -820,6 +837,7 @@ public Builder setDocument(com.google.firestore.v1.Document value) { onChanged(); return this; } + /** * * @@ -841,6 +859,7 @@ public Builder setDocument(com.google.firestore.v1.Document.Builder builderForVa onChanged(); return this; } + /** * * @@ -870,6 +889,7 @@ public Builder mergeDocument(com.google.firestore.v1.Document value) { } return this; } + /** * * @@ -891,6 +911,7 @@ public Builder clearDocument() { onChanged(); return this; } + /** * * @@ -907,6 +928,7 @@ public com.google.firestore.v1.Document.Builder getDocumentBuilder() { onChanged(); return getDocumentFieldBuilder().getBuilder(); } + /** * * @@ -927,6 +949,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { : document_; } } + /** * * @@ -961,6 +984,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { com.google.firestore.v1.DocumentMask.Builder, com.google.firestore.v1.DocumentMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -981,6 +1005,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1007,6 +1032,7 @@ public com.google.firestore.v1.DocumentMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -1035,6 +1061,7 @@ public Builder setUpdateMask(com.google.firestore.v1.DocumentMask value) { onChanged(); return this; } + /** * * @@ -1060,6 +1087,7 @@ public Builder setUpdateMask(com.google.firestore.v1.DocumentMask.Builder builde onChanged(); return this; } + /** * * @@ -1093,6 +1121,7 @@ public Builder mergeUpdateMask(com.google.firestore.v1.DocumentMask value) { } return this; } + /** * * @@ -1118,6 +1147,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1138,6 +1168,7 @@ public com.google.firestore.v1.DocumentMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1162,6 +1193,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1200,6 +1232,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { com.google.firestore.v1.DocumentMask.Builder, com.google.firestore.v1.DocumentMaskOrBuilder> maskBuilder_; + /** * * @@ -1217,6 +1250,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { public boolean hasMask() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1238,6 +1272,7 @@ public com.google.firestore.v1.DocumentMask getMask() { return maskBuilder_.getMessage(); } } + /** * * @@ -1263,6 +1298,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask value) { onChanged(); return this; } + /** * * @@ -1285,6 +1321,7 @@ public Builder setMask(com.google.firestore.v1.DocumentMask.Builder builderForVa onChanged(); return this; } + /** * * @@ -1315,6 +1352,7 @@ public Builder mergeMask(com.google.firestore.v1.DocumentMask value) { } return this; } + /** * * @@ -1337,6 +1375,7 @@ public Builder clearMask() { onChanged(); return this; } + /** * * @@ -1354,6 +1393,7 @@ public com.google.firestore.v1.DocumentMask.Builder getMaskBuilder() { onChanged(); return getMaskFieldBuilder().getBuilder(); } + /** * * @@ -1373,6 +1413,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } } + /** * * @@ -1408,6 +1449,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { com.google.firestore.v1.Precondition.Builder, com.google.firestore.v1.PreconditionOrBuilder> currentDocumentBuilder_; + /** * * @@ -1423,6 +1465,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { public boolean hasCurrentDocument() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1444,6 +1487,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { return currentDocumentBuilder_.getMessage(); } } + /** * * @@ -1467,6 +1511,7 @@ public Builder setCurrentDocument(com.google.firestore.v1.Precondition value) { onChanged(); return this; } + /** * * @@ -1488,6 +1533,7 @@ public Builder setCurrentDocument( onChanged(); return this; } + /** * * @@ -1516,6 +1562,7 @@ public Builder mergeCurrentDocument(com.google.firestore.v1.Precondition value) } return this; } + /** * * @@ -1536,6 +1583,7 @@ public Builder clearCurrentDocument() { onChanged(); return this; } + /** * * @@ -1551,6 +1599,7 @@ public com.google.firestore.v1.Precondition.Builder getCurrentDocumentBuilder() onChanged(); return getCurrentDocumentFieldBuilder().getBuilder(); } + /** * * @@ -1570,6 +1619,7 @@ public com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder : currentDocument_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequestOrBuilder.java index eeaff9772..3d04bde03 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface UpdateDocumentRequestOrBuilder @@ -38,6 +38,7 @@ public interface UpdateDocumentRequestOrBuilder * @return Whether the document field is set. */ boolean hasDocument(); + /** * * @@ -52,6 +53,7 @@ public interface UpdateDocumentRequestOrBuilder * @return The document. */ com.google.firestore.v1.Document getDocument(); + /** * * @@ -83,6 +85,7 @@ public interface UpdateDocumentRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -101,6 +104,7 @@ public interface UpdateDocumentRequestOrBuilder * @return The updateMask. */ com.google.firestore.v1.DocumentMask getUpdateMask(); + /** * * @@ -133,6 +137,7 @@ public interface UpdateDocumentRequestOrBuilder * @return Whether the mask field is set. */ boolean hasMask(); + /** * * @@ -148,6 +153,7 @@ public interface UpdateDocumentRequestOrBuilder * @return The mask. */ com.google.firestore.v1.DocumentMask getMask(); + /** * * @@ -175,6 +181,7 @@ public interface UpdateDocumentRequestOrBuilder * @return Whether the currentDocument field is set. */ boolean hasCurrentDocument(); + /** * * @@ -188,6 +195,7 @@ public interface UpdateDocumentRequestOrBuilder * @return The currentDocument. */ com.google.firestore.v1.Precondition getCurrentDocument(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java index 04b89bd2c..e5c87d1ea 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class Value extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.Value) ValueOrBuilder { private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -80,12 +81,16 @@ public enum ValueTypeCase GEO_POINT_VALUE(8), ARRAY_VALUE(9), MAP_VALUE(6), + FIELD_REFERENCE_VALUE(19), + FUNCTION_VALUE(20), + PIPELINE_VALUE(21), VALUETYPE_NOT_SET(0); private final int value; private ValueTypeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -120,6 +125,12 @@ public static ValueTypeCase forNumber(int value) { return ARRAY_VALUE; case 6: return MAP_VALUE; + case 19: + return FIELD_REFERENCE_VALUE; + case 20: + return FUNCTION_VALUE; + case 21: + return PIPELINE_VALUE; case 0: return VALUETYPE_NOT_SET; default: @@ -137,6 +148,7 @@ public ValueTypeCase getValueTypeCase() { } public static final int NULL_VALUE_FIELD_NUMBER = 11; + /** * * @@ -151,6 +163,7 @@ public ValueTypeCase getValueTypeCase() { public boolean hasNullValue() { return valueTypeCase_ == 11; } + /** * * @@ -168,6 +181,7 @@ public int getNullValueValue() { } return 0; } + /** * * @@ -189,6 +203,7 @@ public com.google.protobuf.NullValue getNullValue() { } public static final int BOOLEAN_VALUE_FIELD_NUMBER = 1; + /** * * @@ -204,6 +219,7 @@ public com.google.protobuf.NullValue getNullValue() { public boolean hasBooleanValue() { return valueTypeCase_ == 1; } + /** * * @@ -224,6 +240,7 @@ public boolean getBooleanValue() { } public static final int INTEGER_VALUE_FIELD_NUMBER = 2; + /** * * @@ -239,6 +256,7 @@ public boolean getBooleanValue() { public boolean hasIntegerValue() { return valueTypeCase_ == 2; } + /** * * @@ -259,6 +277,7 @@ public long getIntegerValue() { } public static final int DOUBLE_VALUE_FIELD_NUMBER = 3; + /** * * @@ -274,6 +293,7 @@ public long getIntegerValue() { public boolean hasDoubleValue() { return valueTypeCase_ == 3; } + /** * * @@ -294,6 +314,7 @@ public double getDoubleValue() { } public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 10; + /** * * @@ -312,6 +333,7 @@ public double getDoubleValue() { public boolean hasTimestampValue() { return valueTypeCase_ == 10; } + /** * * @@ -333,6 +355,7 @@ public com.google.protobuf.Timestamp getTimestampValue() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -354,6 +377,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { } public static final int STRING_VALUE_FIELD_NUMBER = 17; + /** * * @@ -372,6 +396,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { public boolean hasStringValue() { return valueTypeCase_ == 17; } + /** * * @@ -403,6 +428,7 @@ public java.lang.String getStringValue() { return s; } } + /** * * @@ -436,6 +462,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { } public static final int BYTES_VALUE_FIELD_NUMBER = 18; + /** * * @@ -454,6 +481,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { public boolean hasBytesValue() { return valueTypeCase_ == 18; } + /** * * @@ -477,6 +505,7 @@ public com.google.protobuf.ByteString getBytesValue() { } public static final int REFERENCE_VALUE_FIELD_NUMBER = 5; + /** * * @@ -492,6 +521,7 @@ public com.google.protobuf.ByteString getBytesValue() { public boolean hasReferenceValue() { return valueTypeCase_ == 5; } + /** * * @@ -520,6 +550,7 @@ public java.lang.String getReferenceValue() { return s; } } + /** * * @@ -550,6 +581,7 @@ public com.google.protobuf.ByteString getReferenceValueBytes() { } public static final int GEO_POINT_VALUE_FIELD_NUMBER = 8; + /** * * @@ -565,6 +597,7 @@ public com.google.protobuf.ByteString getReferenceValueBytes() { public boolean hasGeoPointValue() { return valueTypeCase_ == 8; } + /** * * @@ -583,6 +616,7 @@ public com.google.type.LatLng getGeoPointValue() { } return com.google.type.LatLng.getDefaultInstance(); } + /** * * @@ -601,6 +635,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { } public static final int ARRAY_VALUE_FIELD_NUMBER = 9; + /** * * @@ -619,6 +654,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { public boolean hasArrayValue() { return valueTypeCase_ == 9; } + /** * * @@ -640,6 +676,7 @@ public com.google.firestore.v1.ArrayValue getArrayValue() { } return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } + /** * * @@ -661,6 +698,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { } public static final int MAP_VALUE_FIELD_NUMBER = 6; + /** * * @@ -676,6 +714,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { public boolean hasMapValue() { return valueTypeCase_ == 6; } + /** * * @@ -694,6 +733,7 @@ public com.google.firestore.v1.MapValue getMapValue() { } return com.google.firestore.v1.MapValue.getDefaultInstance(); } + /** * * @@ -711,6 +751,238 @@ public com.google.firestore.v1.MapValueOrBuilder getMapValueOrBuilder() { return com.google.firestore.v1.MapValue.getDefaultInstance(); } + public static final int FIELD_REFERENCE_VALUE_FIELD_NUMBER = 19; + + /** + * + * + *
+   * Value which references a field.
+   *
+   * This is considered relative (vs absolute) since it only refers to a field
+   * and not a field within a particular document.
+   *
+   * **Requires:**
+   *
+   * * Must follow [field reference][FieldReference.field_path] limitations.
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * string field_reference_value = 19; + * + * @return Whether the fieldReferenceValue field is set. + */ + public boolean hasFieldReferenceValue() { + return valueTypeCase_ == 19; + } + + /** + * + * + *
+   * Value which references a field.
+   *
+   * This is considered relative (vs absolute) since it only refers to a field
+   * and not a field within a particular document.
+   *
+   * **Requires:**
+   *
+   * * Must follow [field reference][FieldReference.field_path] limitations.
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * string field_reference_value = 19; + * + * @return The fieldReferenceValue. + */ + public java.lang.String getFieldReferenceValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 19) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueTypeCase_ == 19) { + valueType_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Value which references a field.
+   *
+   * This is considered relative (vs absolute) since it only refers to a field
+   * and not a field within a particular document.
+   *
+   * **Requires:**
+   *
+   * * Must follow [field reference][FieldReference.field_path] limitations.
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * string field_reference_value = 19; + * + * @return The bytes for fieldReferenceValue. + */ + public com.google.protobuf.ByteString getFieldReferenceValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 19) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 19) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FUNCTION_VALUE_FIELD_NUMBER = 20; + + /** + * + * + *
+   * A value that represents an unevaluated expression.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Function function_value = 20; + * + * @return Whether the functionValue field is set. + */ + @java.lang.Override + public boolean hasFunctionValue() { + return valueTypeCase_ == 20; + } + + /** + * + * + *
+   * A value that represents an unevaluated expression.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Function function_value = 20; + * + * @return The functionValue. + */ + @java.lang.Override + public com.google.firestore.v1.Function getFunctionValue() { + if (valueTypeCase_ == 20) { + return (com.google.firestore.v1.Function) valueType_; + } + return com.google.firestore.v1.Function.getDefaultInstance(); + } + + /** + * + * + *
+   * A value that represents an unevaluated expression.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + @java.lang.Override + public com.google.firestore.v1.FunctionOrBuilder getFunctionValueOrBuilder() { + if (valueTypeCase_ == 20) { + return (com.google.firestore.v1.Function) valueType_; + } + return com.google.firestore.v1.Function.getDefaultInstance(); + } + + public static final int PIPELINE_VALUE_FIELD_NUMBER = 21; + + /** + * + * + *
+   * A value that represents an unevaluated pipeline.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + * + * @return Whether the pipelineValue field is set. + */ + @java.lang.Override + public boolean hasPipelineValue() { + return valueTypeCase_ == 21; + } + + /** + * + * + *
+   * A value that represents an unevaluated pipeline.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + * + * @return The pipelineValue. + */ + @java.lang.Override + public com.google.firestore.v1.Pipeline getPipelineValue() { + if (valueTypeCase_ == 21) { + return (com.google.firestore.v1.Pipeline) valueType_; + } + return com.google.firestore.v1.Pipeline.getDefaultInstance(); + } + + /** + * + * + *
+   * A value that represents an unevaluated pipeline.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + @java.lang.Override + public com.google.firestore.v1.PipelineOrBuilder getPipelineValueOrBuilder() { + if (valueTypeCase_ == 21) { + return (com.google.firestore.v1.Pipeline) valueType_; + } + return com.google.firestore.v1.Pipeline.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -758,6 +1030,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (valueTypeCase_ == 18) { output.writeBytes(18, (com.google.protobuf.ByteString) valueType_); } + if (valueTypeCase_ == 19) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, valueType_); + } + if (valueTypeCase_ == 20) { + output.writeMessage(20, (com.google.firestore.v1.Function) valueType_); + } + if (valueTypeCase_ == 21) { + output.writeMessage(21, (com.google.firestore.v1.Pipeline) valueType_); + } getUnknownFields().writeTo(output); } @@ -818,6 +1099,19 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBytesSize( 18, (com.google.protobuf.ByteString) valueType_); } + if (valueTypeCase_ == 19) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, valueType_); + } + if (valueTypeCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.firestore.v1.Function) valueType_); + } + if (valueTypeCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.firestore.v1.Pipeline) valueType_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -869,6 +1163,15 @@ public boolean equals(final java.lang.Object obj) { case 6: if (!getMapValue().equals(other.getMapValue())) return false; break; + case 19: + if (!getFieldReferenceValue().equals(other.getFieldReferenceValue())) return false; + break; + case 20: + if (!getFunctionValue().equals(other.getFunctionValue())) return false; + break; + case 21: + if (!getPipelineValue().equals(other.getPipelineValue())) return false; + break; case 0: default: } @@ -931,6 +1234,18 @@ public int hashCode() { hash = (37 * hash) + MAP_VALUE_FIELD_NUMBER; hash = (53 * hash) + getMapValue().hashCode(); break; + case 19: + hash = (37 * hash) + FIELD_REFERENCE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getFieldReferenceValue().hashCode(); + break; + case 20: + hash = (37 * hash) + FUNCTION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getFunctionValue().hashCode(); + break; + case 21: + hash = (37 * hash) + PIPELINE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getPipelineValue().hashCode(); + break; case 0: default: } @@ -1033,6 +1348,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1083,6 +1399,12 @@ public Builder clear() { if (mapValueBuilder_ != null) { mapValueBuilder_.clear(); } + if (functionValueBuilder_ != null) { + functionValueBuilder_.clear(); + } + if (pipelineValueBuilder_ != null) { + pipelineValueBuilder_.clear(); + } valueTypeCase_ = 0; valueType_ = null; return this; @@ -1138,6 +1460,12 @@ private void buildPartialOneofs(com.google.firestore.v1.Value result) { if (valueTypeCase_ == 6 && mapValueBuilder_ != null) { result.valueType_ = mapValueBuilder_.build(); } + if (valueTypeCase_ == 20 && functionValueBuilder_ != null) { + result.valueType_ = functionValueBuilder_.build(); + } + if (valueTypeCase_ == 21 && pipelineValueBuilder_ != null) { + result.valueType_ = pipelineValueBuilder_.build(); + } } @java.lang.Override @@ -1245,6 +1573,23 @@ public Builder mergeFrom(com.google.firestore.v1.Value other) { mergeMapValue(other.getMapValue()); break; } + case FIELD_REFERENCE_VALUE: + { + valueTypeCase_ = 19; + valueType_ = other.valueType_; + onChanged(); + break; + } + case FUNCTION_VALUE: + { + mergeFunctionValue(other.getFunctionValue()); + break; + } + case PIPELINE_VALUE: + { + mergePipelineValue(other.getPipelineValue()); + break; + } case VALUETYPE_NOT_SET: { break; @@ -1345,6 +1690,25 @@ public Builder mergeFrom( valueTypeCase_ = 18; break; } // case 146 + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + valueTypeCase_ = 19; + valueType_ = s; + break; + } // case 154 + case 162: + { + input.readMessage(getFunctionValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage(getPipelineValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 21; + break; + } // case 170 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1393,6 +1757,7 @@ public Builder clearValueType() { public boolean hasNullValue() { return valueTypeCase_ == 11; } + /** * * @@ -1411,6 +1776,7 @@ public int getNullValueValue() { } return 0; } + /** * * @@ -1429,6 +1795,7 @@ public Builder setNullValueValue(int value) { onChanged(); return this; } + /** * * @@ -1449,6 +1816,7 @@ public com.google.protobuf.NullValue getNullValue() { } return com.google.protobuf.NullValue.NULL_VALUE; } + /** * * @@ -1470,6 +1838,7 @@ public Builder setNullValue(com.google.protobuf.NullValue value) { onChanged(); return this; } + /** * * @@ -1504,6 +1873,7 @@ public Builder clearNullValue() { public boolean hasBooleanValue() { return valueTypeCase_ == 1; } + /** * * @@ -1521,6 +1891,7 @@ public boolean getBooleanValue() { } return false; } + /** * * @@ -1540,6 +1911,7 @@ public Builder setBooleanValue(boolean value) { onChanged(); return this; } + /** * * @@ -1574,6 +1946,7 @@ public Builder clearBooleanValue() { public boolean hasIntegerValue() { return valueTypeCase_ == 2; } + /** * * @@ -1591,6 +1964,7 @@ public long getIntegerValue() { } return 0L; } + /** * * @@ -1610,6 +1984,7 @@ public Builder setIntegerValue(long value) { onChanged(); return this; } + /** * * @@ -1644,6 +2019,7 @@ public Builder clearIntegerValue() { public boolean hasDoubleValue() { return valueTypeCase_ == 3; } + /** * * @@ -1661,6 +2037,7 @@ public double getDoubleValue() { } return 0D; } + /** * * @@ -1680,6 +2057,7 @@ public Builder setDoubleValue(double value) { onChanged(); return this; } + /** * * @@ -1705,6 +2083,7 @@ public Builder clearDoubleValue() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampValueBuilder_; + /** * * @@ -1723,6 +2102,7 @@ public Builder clearDoubleValue() { public boolean hasTimestampValue() { return valueTypeCase_ == 10; } + /** * * @@ -1751,6 +2131,7 @@ public com.google.protobuf.Timestamp getTimestampValue() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1776,6 +2157,7 @@ public Builder setTimestampValue(com.google.protobuf.Timestamp value) { valueTypeCase_ = 10; return this; } + /** * * @@ -1798,6 +2180,7 @@ public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderFo valueTypeCase_ = 10; return this; } + /** * * @@ -1832,6 +2215,7 @@ public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { valueTypeCase_ = 10; return this; } + /** * * @@ -1860,6 +2244,7 @@ public Builder clearTimestampValue() { } return this; } + /** * * @@ -1875,6 +2260,7 @@ public Builder clearTimestampValue() { public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { return getTimestampValueFieldBuilder().getBuilder(); } + /** * * @@ -1898,6 +2284,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1951,6 +2338,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { public boolean hasStringValue() { return valueTypeCase_ == 17; } + /** * * @@ -1983,6 +2371,7 @@ public java.lang.String getStringValue() { return (java.lang.String) ref; } } + /** * * @@ -2015,6 +2404,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2040,6 +2430,7 @@ public Builder setStringValue(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2063,6 +2454,7 @@ public Builder clearStringValue() { } return this; } + /** * * @@ -2107,6 +2499,7 @@ public Builder setStringValueBytes(com.google.protobuf.ByteString value) { public boolean hasBytesValue() { return valueTypeCase_ == 18; } + /** * * @@ -2127,6 +2520,7 @@ public com.google.protobuf.ByteString getBytesValue() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -2151,6 +2545,7 @@ public Builder setBytesValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2190,6 +2585,7 @@ public Builder clearBytesValue() { public boolean hasReferenceValue() { return valueTypeCase_ == 5; } + /** * * @@ -2219,6 +2615,7 @@ public java.lang.String getReferenceValue() { return (java.lang.String) ref; } } + /** * * @@ -2248,6 +2645,7 @@ public com.google.protobuf.ByteString getReferenceValueBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2270,6 +2668,7 @@ public Builder setReferenceValue(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2290,6 +2689,7 @@ public Builder clearReferenceValue() { } return this; } + /** * * @@ -2317,6 +2717,7 @@ public Builder setReferenceValueBytes(com.google.protobuf.ByteString value) { private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> geoPointValueBuilder_; + /** * * @@ -2332,6 +2733,7 @@ public Builder setReferenceValueBytes(com.google.protobuf.ByteString value) { public boolean hasGeoPointValue() { return valueTypeCase_ == 8; } + /** * * @@ -2357,6 +2759,7 @@ public com.google.type.LatLng getGeoPointValue() { return com.google.type.LatLng.getDefaultInstance(); } } + /** * * @@ -2379,6 +2782,7 @@ public Builder setGeoPointValue(com.google.type.LatLng value) { valueTypeCase_ = 8; return this; } + /** * * @@ -2398,6 +2802,7 @@ public Builder setGeoPointValue(com.google.type.LatLng.Builder builderForValue) valueTypeCase_ = 8; return this; } + /** * * @@ -2428,6 +2833,7 @@ public Builder mergeGeoPointValue(com.google.type.LatLng value) { valueTypeCase_ = 8; return this; } + /** * * @@ -2453,6 +2859,7 @@ public Builder clearGeoPointValue() { } return this; } + /** * * @@ -2465,6 +2872,7 @@ public Builder clearGeoPointValue() { public com.google.type.LatLng.Builder getGeoPointValueBuilder() { return getGeoPointValueFieldBuilder().getBuilder(); } + /** * * @@ -2485,6 +2893,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { return com.google.type.LatLng.getDefaultInstance(); } } + /** * * @@ -2519,6 +2928,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { com.google.firestore.v1.ArrayValue.Builder, com.google.firestore.v1.ArrayValueOrBuilder> arrayValueBuilder_; + /** * * @@ -2537,6 +2947,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { public boolean hasArrayValue() { return valueTypeCase_ == 9; } + /** * * @@ -2565,6 +2976,7 @@ public com.google.firestore.v1.ArrayValue getArrayValue() { return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } } + /** * * @@ -2590,6 +3002,7 @@ public Builder setArrayValue(com.google.firestore.v1.ArrayValue value) { valueTypeCase_ = 9; return this; } + /** * * @@ -2612,6 +3025,7 @@ public Builder setArrayValue(com.google.firestore.v1.ArrayValue.Builder builderF valueTypeCase_ = 9; return this; } + /** * * @@ -2647,6 +3061,7 @@ public Builder mergeArrayValue(com.google.firestore.v1.ArrayValue value) { valueTypeCase_ = 9; return this; } + /** * * @@ -2675,6 +3090,7 @@ public Builder clearArrayValue() { } return this; } + /** * * @@ -2690,6 +3106,7 @@ public Builder clearArrayValue() { public com.google.firestore.v1.ArrayValue.Builder getArrayValueBuilder() { return getArrayValueFieldBuilder().getBuilder(); } + /** * * @@ -2713,6 +3130,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { return com.google.firestore.v1.ArrayValue.getDefaultInstance(); } } + /** * * @@ -2752,6 +3170,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { com.google.firestore.v1.MapValue.Builder, com.google.firestore.v1.MapValueOrBuilder> mapValueBuilder_; + /** * * @@ -2767,6 +3186,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { public boolean hasMapValue() { return valueTypeCase_ == 6; } + /** * * @@ -2792,6 +3212,7 @@ public com.google.firestore.v1.MapValue getMapValue() { return com.google.firestore.v1.MapValue.getDefaultInstance(); } } + /** * * @@ -2814,6 +3235,7 @@ public Builder setMapValue(com.google.firestore.v1.MapValue value) { valueTypeCase_ = 6; return this; } + /** * * @@ -2833,6 +3255,7 @@ public Builder setMapValue(com.google.firestore.v1.MapValue.Builder builderForVa valueTypeCase_ = 6; return this; } + /** * * @@ -2865,6 +3288,7 @@ public Builder mergeMapValue(com.google.firestore.v1.MapValue value) { valueTypeCase_ = 6; return this; } + /** * * @@ -2890,6 +3314,7 @@ public Builder clearMapValue() { } return this; } + /** * * @@ -2902,6 +3327,7 @@ public Builder clearMapValue() { public com.google.firestore.v1.MapValue.Builder getMapValueBuilder() { return getMapValueFieldBuilder().getBuilder(); } + /** * * @@ -2922,6 +3348,7 @@ public com.google.firestore.v1.MapValueOrBuilder getMapValueOrBuilder() { return com.google.firestore.v1.MapValue.getDefaultInstance(); } } + /** * * @@ -2953,6 +3380,701 @@ public com.google.firestore.v1.MapValueOrBuilder getMapValueOrBuilder() { return mapValueBuilder_; } + /** + * + * + *
+     * Value which references a field.
+     *
+     * This is considered relative (vs absolute) since it only refers to a field
+     * and not a field within a particular document.
+     *
+     * **Requires:**
+     *
+     * * Must follow [field reference][FieldReference.field_path] limitations.
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * string field_reference_value = 19; + * + * @return Whether the fieldReferenceValue field is set. + */ + @java.lang.Override + public boolean hasFieldReferenceValue() { + return valueTypeCase_ == 19; + } + + /** + * + * + *
+     * Value which references a field.
+     *
+     * This is considered relative (vs absolute) since it only refers to a field
+     * and not a field within a particular document.
+     *
+     * **Requires:**
+     *
+     * * Must follow [field reference][FieldReference.field_path] limitations.
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * string field_reference_value = 19; + * + * @return The fieldReferenceValue. + */ + @java.lang.Override + public java.lang.String getFieldReferenceValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 19) { + ref = valueType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueTypeCase_ == 19) { + valueType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Value which references a field.
+     *
+     * This is considered relative (vs absolute) since it only refers to a field
+     * and not a field within a particular document.
+     *
+     * **Requires:**
+     *
+     * * Must follow [field reference][FieldReference.field_path] limitations.
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * string field_reference_value = 19; + * + * @return The bytes for fieldReferenceValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldReferenceValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 19) { + ref = valueType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 19) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Value which references a field.
+     *
+     * This is considered relative (vs absolute) since it only refers to a field
+     * and not a field within a particular document.
+     *
+     * **Requires:**
+     *
+     * * Must follow [field reference][FieldReference.field_path] limitations.
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * string field_reference_value = 19; + * + * @param value The fieldReferenceValue to set. + * @return This builder for chaining. + */ + public Builder setFieldReferenceValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 19; + valueType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Value which references a field.
+     *
+     * This is considered relative (vs absolute) since it only refers to a field
+     * and not a field within a particular document.
+     *
+     * **Requires:**
+     *
+     * * Must follow [field reference][FieldReference.field_path] limitations.
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * string field_reference_value = 19; + * + * @return This builder for chaining. + */ + public Builder clearFieldReferenceValue() { + if (valueTypeCase_ == 19) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Value which references a field.
+     *
+     * This is considered relative (vs absolute) since it only refers to a field
+     * and not a field within a particular document.
+     *
+     * **Requires:**
+     *
+     * * Must follow [field reference][FieldReference.field_path] limitations.
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * string field_reference_value = 19; + * + * @param value The bytes for fieldReferenceValue to set. + * @return This builder for chaining. + */ + public Builder setFieldReferenceValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueTypeCase_ = 19; + valueType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Function, + com.google.firestore.v1.Function.Builder, + com.google.firestore.v1.FunctionOrBuilder> + functionValueBuilder_; + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + * + * @return Whether the functionValue field is set. + */ + @java.lang.Override + public boolean hasFunctionValue() { + return valueTypeCase_ == 20; + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + * + * @return The functionValue. + */ + @java.lang.Override + public com.google.firestore.v1.Function getFunctionValue() { + if (functionValueBuilder_ == null) { + if (valueTypeCase_ == 20) { + return (com.google.firestore.v1.Function) valueType_; + } + return com.google.firestore.v1.Function.getDefaultInstance(); + } else { + if (valueTypeCase_ == 20) { + return functionValueBuilder_.getMessage(); + } + return com.google.firestore.v1.Function.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + public Builder setFunctionValue(com.google.firestore.v1.Function value) { + if (functionValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + functionValueBuilder_.setMessage(value); + } + valueTypeCase_ = 20; + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + public Builder setFunctionValue(com.google.firestore.v1.Function.Builder builderForValue) { + if (functionValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + functionValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 20; + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + public Builder mergeFunctionValue(com.google.firestore.v1.Function value) { + if (functionValueBuilder_ == null) { + if (valueTypeCase_ == 20 + && valueType_ != com.google.firestore.v1.Function.getDefaultInstance()) { + valueType_ = + com.google.firestore.v1.Function.newBuilder( + (com.google.firestore.v1.Function) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 20) { + functionValueBuilder_.mergeFrom(value); + } else { + functionValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 20; + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + public Builder clearFunctionValue() { + if (functionValueBuilder_ == null) { + if (valueTypeCase_ == 20) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 20) { + valueTypeCase_ = 0; + valueType_ = null; + } + functionValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + public com.google.firestore.v1.Function.Builder getFunctionValueBuilder() { + return getFunctionValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + @java.lang.Override + public com.google.firestore.v1.FunctionOrBuilder getFunctionValueOrBuilder() { + if ((valueTypeCase_ == 20) && (functionValueBuilder_ != null)) { + return functionValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 20) { + return (com.google.firestore.v1.Function) valueType_; + } + return com.google.firestore.v1.Function.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A value that represents an unevaluated expression.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Function, + com.google.firestore.v1.Function.Builder, + com.google.firestore.v1.FunctionOrBuilder> + getFunctionValueFieldBuilder() { + if (functionValueBuilder_ == null) { + if (!(valueTypeCase_ == 20)) { + valueType_ = com.google.firestore.v1.Function.getDefaultInstance(); + } + functionValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Function, + com.google.firestore.v1.Function.Builder, + com.google.firestore.v1.FunctionOrBuilder>( + (com.google.firestore.v1.Function) valueType_, getParentForChildren(), isClean()); + valueType_ = null; + } + valueTypeCase_ = 20; + onChanged(); + return functionValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Pipeline, + com.google.firestore.v1.Pipeline.Builder, + com.google.firestore.v1.PipelineOrBuilder> + pipelineValueBuilder_; + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + * + * @return Whether the pipelineValue field is set. + */ + @java.lang.Override + public boolean hasPipelineValue() { + return valueTypeCase_ == 21; + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + * + * @return The pipelineValue. + */ + @java.lang.Override + public com.google.firestore.v1.Pipeline getPipelineValue() { + if (pipelineValueBuilder_ == null) { + if (valueTypeCase_ == 21) { + return (com.google.firestore.v1.Pipeline) valueType_; + } + return com.google.firestore.v1.Pipeline.getDefaultInstance(); + } else { + if (valueTypeCase_ == 21) { + return pipelineValueBuilder_.getMessage(); + } + return com.google.firestore.v1.Pipeline.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + public Builder setPipelineValue(com.google.firestore.v1.Pipeline value) { + if (pipelineValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + pipelineValueBuilder_.setMessage(value); + } + valueTypeCase_ = 21; + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + public Builder setPipelineValue(com.google.firestore.v1.Pipeline.Builder builderForValue) { + if (pipelineValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + pipelineValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 21; + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + public Builder mergePipelineValue(com.google.firestore.v1.Pipeline value) { + if (pipelineValueBuilder_ == null) { + if (valueTypeCase_ == 21 + && valueType_ != com.google.firestore.v1.Pipeline.getDefaultInstance()) { + valueType_ = + com.google.firestore.v1.Pipeline.newBuilder( + (com.google.firestore.v1.Pipeline) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 21) { + pipelineValueBuilder_.mergeFrom(value); + } else { + pipelineValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 21; + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + public Builder clearPipelineValue() { + if (pipelineValueBuilder_ == null) { + if (valueTypeCase_ == 21) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 21) { + valueTypeCase_ = 0; + valueType_ = null; + } + pipelineValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + public com.google.firestore.v1.Pipeline.Builder getPipelineValueBuilder() { + return getPipelineValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + @java.lang.Override + public com.google.firestore.v1.PipelineOrBuilder getPipelineValueOrBuilder() { + if ((valueTypeCase_ == 21) && (pipelineValueBuilder_ != null)) { + return pipelineValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 21) { + return (com.google.firestore.v1.Pipeline) valueType_; + } + return com.google.firestore.v1.Pipeline.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A value that represents an unevaluated pipeline.
+     *
+     * **Requires:**
+     *
+     * * Not allowed to be used when writing documents.
+     * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Pipeline, + com.google.firestore.v1.Pipeline.Builder, + com.google.firestore.v1.PipelineOrBuilder> + getPipelineValueFieldBuilder() { + if (pipelineValueBuilder_ == null) { + if (!(valueTypeCase_ == 21)) { + valueType_ = com.google.firestore.v1.Pipeline.getDefaultInstance(); + } + pipelineValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Pipeline, + com.google.firestore.v1.Pipeline.Builder, + com.google.firestore.v1.PipelineOrBuilder>( + (com.google.firestore.v1.Pipeline) valueType_, getParentForChildren(), isClean()); + valueType_ = null; + } + valueTypeCase_ = 21; + onChanged(); + return pipelineValueBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ValueOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ValueOrBuilder.java index 058ca3b72..9dd98fd75 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ValueOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ValueOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/document.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface ValueOrBuilder @@ -36,6 +36,7 @@ public interface ValueOrBuilder * @return Whether the nullValue field is set. */ boolean hasNullValue(); + /** * * @@ -48,6 +49,7 @@ public interface ValueOrBuilder * @return The enum numeric value on the wire for nullValue. */ int getNullValueValue(); + /** * * @@ -73,6 +75,7 @@ public interface ValueOrBuilder * @return Whether the booleanValue field is set. */ boolean hasBooleanValue(); + /** * * @@ -98,6 +101,7 @@ public interface ValueOrBuilder * @return Whether the integerValue field is set. */ boolean hasIntegerValue(); + /** * * @@ -123,6 +127,7 @@ public interface ValueOrBuilder * @return Whether the doubleValue field is set. */ boolean hasDoubleValue(); + /** * * @@ -151,6 +156,7 @@ public interface ValueOrBuilder * @return Whether the timestampValue field is set. */ boolean hasTimestampValue(); + /** * * @@ -166,6 +172,7 @@ public interface ValueOrBuilder * @return The timestampValue. */ com.google.protobuf.Timestamp getTimestampValue(); + /** * * @@ -196,6 +203,7 @@ public interface ValueOrBuilder * @return Whether the stringValue field is set. */ boolean hasStringValue(); + /** * * @@ -212,6 +220,7 @@ public interface ValueOrBuilder * @return The stringValue. */ java.lang.String getStringValue(); + /** * * @@ -244,6 +253,7 @@ public interface ValueOrBuilder * @return Whether the bytesValue field is set. */ boolean hasBytesValue(); + /** * * @@ -273,6 +283,7 @@ public interface ValueOrBuilder * @return Whether the referenceValue field is set. */ boolean hasReferenceValue(); + /** * * @@ -286,6 +297,7 @@ public interface ValueOrBuilder * @return The referenceValue. */ java.lang.String getReferenceValue(); + /** * * @@ -312,6 +324,7 @@ public interface ValueOrBuilder * @return Whether the geoPointValue field is set. */ boolean hasGeoPointValue(); + /** * * @@ -324,6 +337,7 @@ public interface ValueOrBuilder * @return The geoPointValue. */ com.google.type.LatLng getGeoPointValue(); + /** * * @@ -350,6 +364,7 @@ public interface ValueOrBuilder * @return Whether the arrayValue field is set. */ boolean hasArrayValue(); + /** * * @@ -365,6 +380,7 @@ public interface ValueOrBuilder * @return The arrayValue. */ com.google.firestore.v1.ArrayValue getArrayValue(); + /** * * @@ -391,6 +407,7 @@ public interface ValueOrBuilder * @return Whether the mapValue field is set. */ boolean hasMapValue(); + /** * * @@ -403,6 +420,7 @@ public interface ValueOrBuilder * @return The mapValue. */ com.google.firestore.v1.MapValue getMapValue(); + /** * * @@ -414,5 +432,169 @@ public interface ValueOrBuilder */ com.google.firestore.v1.MapValueOrBuilder getMapValueOrBuilder(); + /** + * + * + *
+   * Value which references a field.
+   *
+   * This is considered relative (vs absolute) since it only refers to a field
+   * and not a field within a particular document.
+   *
+   * **Requires:**
+   *
+   * * Must follow [field reference][FieldReference.field_path] limitations.
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * string field_reference_value = 19; + * + * @return Whether the fieldReferenceValue field is set. + */ + boolean hasFieldReferenceValue(); + + /** + * + * + *
+   * Value which references a field.
+   *
+   * This is considered relative (vs absolute) since it only refers to a field
+   * and not a field within a particular document.
+   *
+   * **Requires:**
+   *
+   * * Must follow [field reference][FieldReference.field_path] limitations.
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * string field_reference_value = 19; + * + * @return The fieldReferenceValue. + */ + java.lang.String getFieldReferenceValue(); + + /** + * + * + *
+   * Value which references a field.
+   *
+   * This is considered relative (vs absolute) since it only refers to a field
+   * and not a field within a particular document.
+   *
+   * **Requires:**
+   *
+   * * Must follow [field reference][FieldReference.field_path] limitations.
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * string field_reference_value = 19; + * + * @return The bytes for fieldReferenceValue. + */ + com.google.protobuf.ByteString getFieldReferenceValueBytes(); + + /** + * + * + *
+   * A value that represents an unevaluated expression.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Function function_value = 20; + * + * @return Whether the functionValue field is set. + */ + boolean hasFunctionValue(); + + /** + * + * + *
+   * A value that represents an unevaluated expression.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Function function_value = 20; + * + * @return The functionValue. + */ + com.google.firestore.v1.Function getFunctionValue(); + + /** + * + * + *
+   * A value that represents an unevaluated expression.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Function function_value = 20; + */ + com.google.firestore.v1.FunctionOrBuilder getFunctionValueOrBuilder(); + + /** + * + * + *
+   * A value that represents an unevaluated pipeline.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + * + * @return Whether the pipelineValue field is set. + */ + boolean hasPipelineValue(); + + /** + * + * + *
+   * A value that represents an unevaluated pipeline.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + * + * @return The pipelineValue. + */ + com.google.firestore.v1.Pipeline getPipelineValue(); + + /** + * + * + *
+   * A value that represents an unevaluated pipeline.
+   *
+   * **Requires:**
+   *
+   * * Not allowed to be used when writing documents.
+   * 
+ * + * .google.firestore.v1.Pipeline pipeline_value = 21; + */ + com.google.firestore.v1.PipelineOrBuilder getPipelineValueOrBuilder(); + com.google.firestore.v1.Value.ValueTypeCase getValueTypeCase(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java index a234829af..06a43f851 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class Write extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.Write) WriteOrBuilder { private static final long serialVersionUID = 0L; + // Use Write.newBuilder() to construct. private Write(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -80,6 +81,7 @@ public enum OperationCase private OperationCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -115,6 +117,7 @@ public OperationCase getOperationCase() { } public static final int UPDATE_FIELD_NUMBER = 1; + /** * * @@ -130,6 +133,7 @@ public OperationCase getOperationCase() { public boolean hasUpdate() { return operationCase_ == 1; } + /** * * @@ -148,6 +152,7 @@ public com.google.firestore.v1.Document getUpdate() { } return com.google.firestore.v1.Document.getDefaultInstance(); } + /** * * @@ -166,6 +171,7 @@ public com.google.firestore.v1.DocumentOrBuilder getUpdateOrBuilder() { } public static final int DELETE_FIELD_NUMBER = 2; + /** * * @@ -181,6 +187,7 @@ public com.google.firestore.v1.DocumentOrBuilder getUpdateOrBuilder() { public boolean hasDelete() { return operationCase_ == 2; } + /** * * @@ -209,6 +216,7 @@ public java.lang.String getDelete() { return s; } } + /** * * @@ -239,6 +247,7 @@ public com.google.protobuf.ByteString getDeleteBytes() { } public static final int TRANSFORM_FIELD_NUMBER = 6; + /** * * @@ -254,6 +263,7 @@ public com.google.protobuf.ByteString getDeleteBytes() { public boolean hasTransform() { return operationCase_ == 6; } + /** * * @@ -272,6 +282,7 @@ public com.google.firestore.v1.DocumentTransform getTransform() { } return com.google.firestore.v1.DocumentTransform.getDefaultInstance(); } + /** * * @@ -291,6 +302,7 @@ public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder( public static final int UPDATE_MASK_FIELD_NUMBER = 3; private com.google.firestore.v1.DocumentMask updateMask_; + /** * * @@ -315,6 +327,7 @@ public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder( public boolean hasUpdateMask() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -341,6 +354,7 @@ public com.google.firestore.v1.DocumentMask getUpdateMask() { ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : updateMask_; } + /** * * @@ -371,6 +385,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { @SuppressWarnings("serial") private java.util.List updateTransforms_; + /** * * @@ -390,6 +405,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { getUpdateTransformsList() { return updateTransforms_; } + /** * * @@ -409,6 +425,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { getUpdateTransformsOrBuilderList() { return updateTransforms_; } + /** * * @@ -427,6 +444,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { public int getUpdateTransformsCount() { return updateTransforms_.size(); } + /** * * @@ -445,6 +463,7 @@ public int getUpdateTransformsCount() { public com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransforms(int index) { return updateTransforms_.get(index); } + /** * * @@ -467,6 +486,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransfo public static final int CURRENT_DOCUMENT_FIELD_NUMBER = 4; private com.google.firestore.v1.Precondition currentDocument_; + /** * * @@ -484,6 +504,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransfo public boolean hasCurrentDocument() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -503,6 +524,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { ? com.google.firestore.v1.Precondition.getDefaultInstance() : currentDocument_; } + /** * * @@ -760,6 +782,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1117,6 +1140,7 @@ public Builder clearOperation() { com.google.firestore.v1.Document.Builder, com.google.firestore.v1.DocumentOrBuilder> updateBuilder_; + /** * * @@ -1132,6 +1156,7 @@ public Builder clearOperation() { public boolean hasUpdate() { return operationCase_ == 1; } + /** * * @@ -1157,6 +1182,7 @@ public com.google.firestore.v1.Document getUpdate() { return com.google.firestore.v1.Document.getDefaultInstance(); } } + /** * * @@ -1179,6 +1205,7 @@ public Builder setUpdate(com.google.firestore.v1.Document value) { operationCase_ = 1; return this; } + /** * * @@ -1198,6 +1225,7 @@ public Builder setUpdate(com.google.firestore.v1.Document.Builder builderForValu operationCase_ = 1; return this; } + /** * * @@ -1230,6 +1258,7 @@ public Builder mergeUpdate(com.google.firestore.v1.Document value) { operationCase_ = 1; return this; } + /** * * @@ -1255,6 +1284,7 @@ public Builder clearUpdate() { } return this; } + /** * * @@ -1267,6 +1297,7 @@ public Builder clearUpdate() { public com.google.firestore.v1.Document.Builder getUpdateBuilder() { return getUpdateFieldBuilder().getBuilder(); } + /** * * @@ -1287,6 +1318,7 @@ public com.google.firestore.v1.DocumentOrBuilder getUpdateOrBuilder() { return com.google.firestore.v1.Document.getDefaultInstance(); } } + /** * * @@ -1334,6 +1366,7 @@ public com.google.firestore.v1.DocumentOrBuilder getUpdateOrBuilder() { public boolean hasDelete() { return operationCase_ == 2; } + /** * * @@ -1363,6 +1396,7 @@ public java.lang.String getDelete() { return (java.lang.String) ref; } } + /** * * @@ -1392,6 +1426,7 @@ public com.google.protobuf.ByteString getDeleteBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1414,6 +1449,7 @@ public Builder setDelete(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1434,6 +1470,7 @@ public Builder clearDelete() { } return this; } + /** * * @@ -1463,6 +1500,7 @@ public Builder setDeleteBytes(com.google.protobuf.ByteString value) { com.google.firestore.v1.DocumentTransform.Builder, com.google.firestore.v1.DocumentTransformOrBuilder> transformBuilder_; + /** * * @@ -1478,6 +1516,7 @@ public Builder setDeleteBytes(com.google.protobuf.ByteString value) { public boolean hasTransform() { return operationCase_ == 6; } + /** * * @@ -1503,6 +1542,7 @@ public com.google.firestore.v1.DocumentTransform getTransform() { return com.google.firestore.v1.DocumentTransform.getDefaultInstance(); } } + /** * * @@ -1525,6 +1565,7 @@ public Builder setTransform(com.google.firestore.v1.DocumentTransform value) { operationCase_ = 6; return this; } + /** * * @@ -1544,6 +1585,7 @@ public Builder setTransform(com.google.firestore.v1.DocumentTransform.Builder bu operationCase_ = 6; return this; } + /** * * @@ -1576,6 +1618,7 @@ public Builder mergeTransform(com.google.firestore.v1.DocumentTransform value) { operationCase_ = 6; return this; } + /** * * @@ -1601,6 +1644,7 @@ public Builder clearTransform() { } return this; } + /** * * @@ -1613,6 +1657,7 @@ public Builder clearTransform() { public com.google.firestore.v1.DocumentTransform.Builder getTransformBuilder() { return getTransformFieldBuilder().getBuilder(); } + /** * * @@ -1633,6 +1678,7 @@ public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder( return com.google.firestore.v1.DocumentTransform.getDefaultInstance(); } } + /** * * @@ -1672,6 +1718,7 @@ public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder( com.google.firestore.v1.DocumentMask.Builder, com.google.firestore.v1.DocumentMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -1695,6 +1742,7 @@ public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder( public boolean hasUpdateMask() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1724,6 +1772,7 @@ public com.google.firestore.v1.DocumentMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -1755,6 +1804,7 @@ public Builder setUpdateMask(com.google.firestore.v1.DocumentMask value) { onChanged(); return this; } + /** * * @@ -1783,6 +1833,7 @@ public Builder setUpdateMask(com.google.firestore.v1.DocumentMask.Builder builde onChanged(); return this; } + /** * * @@ -1819,6 +1870,7 @@ public Builder mergeUpdateMask(com.google.firestore.v1.DocumentMask value) { } return this; } + /** * * @@ -1847,6 +1899,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1870,6 +1923,7 @@ public com.google.firestore.v1.DocumentMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1897,6 +1951,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1972,6 +2027,7 @@ private void ensureUpdateTransformsIsMutable() { return updateTransformsBuilder_.getMessageList(); } } + /** * * @@ -1993,6 +2049,7 @@ public int getUpdateTransformsCount() { return updateTransformsBuilder_.getCount(); } } + /** * * @@ -2014,6 +2071,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransfo return updateTransformsBuilder_.getMessage(index); } } + /** * * @@ -2042,6 +2100,7 @@ public Builder setUpdateTransforms( } return this; } + /** * * @@ -2068,6 +2127,7 @@ public Builder setUpdateTransforms( } return this; } + /** * * @@ -2096,6 +2156,7 @@ public Builder addUpdateTransforms( } return this; } + /** * * @@ -2124,6 +2185,7 @@ public Builder addUpdateTransforms( } return this; } + /** * * @@ -2149,6 +2211,7 @@ public Builder addUpdateTransforms( } return this; } + /** * * @@ -2175,6 +2238,7 @@ public Builder addUpdateTransforms( } return this; } + /** * * @@ -2201,6 +2265,7 @@ public Builder addAllUpdateTransforms( } return this; } + /** * * @@ -2225,6 +2290,7 @@ public Builder clearUpdateTransforms() { } return this; } + /** * * @@ -2249,6 +2315,7 @@ public Builder removeUpdateTransforms(int index) { } return this; } + /** * * @@ -2267,6 +2334,7 @@ public Builder removeUpdateTransforms(int index) { getUpdateTransformsBuilder(int index) { return getUpdateTransformsFieldBuilder().getBuilder(index); } + /** * * @@ -2289,6 +2357,7 @@ public Builder removeUpdateTransforms(int index) { return updateTransformsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2312,6 +2381,7 @@ public Builder removeUpdateTransforms(int index) { return java.util.Collections.unmodifiableList(updateTransforms_); } } + /** * * @@ -2332,6 +2402,7 @@ public Builder removeUpdateTransforms(int index) { .addBuilder( com.google.firestore.v1.DocumentTransform.FieldTransform.getDefaultInstance()); } + /** * * @@ -2352,6 +2423,7 @@ public Builder removeUpdateTransforms(int index) { .addBuilder( index, com.google.firestore.v1.DocumentTransform.FieldTransform.getDefaultInstance()); } + /** * * @@ -2397,6 +2469,7 @@ public Builder removeUpdateTransforms(int index) { com.google.firestore.v1.Precondition.Builder, com.google.firestore.v1.PreconditionOrBuilder> currentDocumentBuilder_; + /** * * @@ -2413,6 +2486,7 @@ public Builder removeUpdateTransforms(int index) { public boolean hasCurrentDocument() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2435,6 +2509,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { return currentDocumentBuilder_.getMessage(); } } + /** * * @@ -2459,6 +2534,7 @@ public Builder setCurrentDocument(com.google.firestore.v1.Precondition value) { onChanged(); return this; } + /** * * @@ -2481,6 +2557,7 @@ public Builder setCurrentDocument( onChanged(); return this; } + /** * * @@ -2510,6 +2587,7 @@ public Builder mergeCurrentDocument(com.google.firestore.v1.Precondition value) } return this; } + /** * * @@ -2531,6 +2609,7 @@ public Builder clearCurrentDocument() { onChanged(); return this; } + /** * * @@ -2547,6 +2626,7 @@ public com.google.firestore.v1.Precondition.Builder getCurrentDocumentBuilder() onChanged(); return getCurrentDocumentFieldBuilder().getBuilder(); } + /** * * @@ -2567,6 +2647,7 @@ public com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder : currentDocument_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java index e1b4b5672..842373da4 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface WriteOrBuilder @@ -36,6 +36,7 @@ public interface WriteOrBuilder * @return Whether the update field is set. */ boolean hasUpdate(); + /** * * @@ -48,6 +49,7 @@ public interface WriteOrBuilder * @return The update. */ com.google.firestore.v1.Document getUpdate(); + /** * * @@ -72,6 +74,7 @@ public interface WriteOrBuilder * @return Whether the delete field is set. */ boolean hasDelete(); + /** * * @@ -85,6 +88,7 @@ public interface WriteOrBuilder * @return The delete. */ java.lang.String getDelete(); + /** * * @@ -111,6 +115,7 @@ public interface WriteOrBuilder * @return Whether the transform field is set. */ boolean hasTransform(); + /** * * @@ -123,6 +128,7 @@ public interface WriteOrBuilder * @return The transform. */ com.google.firestore.v1.DocumentTransform getTransform(); + /** * * @@ -155,6 +161,7 @@ public interface WriteOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -176,6 +183,7 @@ public interface WriteOrBuilder * @return The updateMask. */ com.google.firestore.v1.DocumentMask getUpdateMask(); + /** * * @@ -212,6 +220,7 @@ public interface WriteOrBuilder */ java.util.List getUpdateTransformsList(); + /** * * @@ -227,6 +236,7 @@ public interface WriteOrBuilder *
*/ com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransforms(int index); + /** * * @@ -242,6 +252,7 @@ public interface WriteOrBuilder *
*/ int getUpdateTransformsCount(); + /** * * @@ -258,6 +269,7 @@ public interface WriteOrBuilder */ java.util.List getUpdateTransformsOrBuilderList(); + /** * * @@ -289,6 +301,7 @@ com.google.firestore.v1.DocumentTransform.FieldTransformOrBuilder getUpdateTrans * @return Whether the currentDocument field is set. */ boolean hasCurrentDocument(); + /** * * @@ -303,6 +316,7 @@ com.google.firestore.v1.DocumentTransform.FieldTransformOrBuilder getUpdateTrans * @return The currentDocument. */ com.google.firestore.v1.Precondition getCurrentDocument(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java index 7b4492322..6d1adee55 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public final class WriteProto { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java index 028fb168f..e5b498d05 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -42,6 +42,7 @@ public final class WriteRequest extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.WriteRequest) WriteRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use WriteRequest.newBuilder() to construct. private WriteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -91,6 +92,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; + /** * * @@ -116,6 +118,7 @@ public java.lang.String getDatabase() { return s; } } + /** * * @@ -146,6 +149,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { @SuppressWarnings("serial") private volatile java.lang.Object streamId_ = ""; + /** * * @@ -171,6 +175,7 @@ public java.lang.String getStreamId() { return s; } } + /** * * @@ -201,6 +206,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { @SuppressWarnings("serial") private java.util.List writes_; + /** * * @@ -219,6 +225,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { public java.util.List getWritesList() { return writes_; } + /** * * @@ -237,6 +244,7 @@ public java.util.List getWritesList() { public java.util.List getWritesOrBuilderList() { return writes_; } + /** * * @@ -255,6 +263,7 @@ public java.util.List getWrite public int getWritesCount() { return writes_.size(); } + /** * * @@ -273,6 +282,7 @@ public int getWritesCount() { public com.google.firestore.v1.Write getWrites(int index) { return writes_.get(index); } + /** * * @@ -294,6 +304,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { public static final int STREAM_TOKEN_FIELD_NUMBER = 4; private com.google.protobuf.ByteString streamToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -349,6 +360,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -365,12 +377,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -384,6 +398,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -404,6 +419,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -628,6 +644,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -947,6 +964,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object database_ = ""; + /** * * @@ -971,6 +989,7 @@ public java.lang.String getDatabase() { return (java.lang.String) ref; } } + /** * * @@ -995,6 +1014,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1018,6 +1038,7 @@ public Builder setDatabase(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1037,6 +1058,7 @@ public Builder clearDatabase() { onChanged(); return this; } + /** * * @@ -1063,6 +1085,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private java.lang.Object streamId_ = ""; + /** * * @@ -1087,6 +1110,7 @@ public java.lang.String getStreamId() { return (java.lang.String) ref; } } + /** * * @@ -1111,6 +1135,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1134,6 +1159,7 @@ public Builder setStreamId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1153,6 +1179,7 @@ public Builder clearStreamId() { onChanged(); return this; } + /** * * @@ -1215,6 +1242,7 @@ public java.util.List getWritesList() { return writesBuilder_.getMessageList(); } } + /** * * @@ -1236,6 +1264,7 @@ public int getWritesCount() { return writesBuilder_.getCount(); } } + /** * * @@ -1257,6 +1286,7 @@ public com.google.firestore.v1.Write getWrites(int index) { return writesBuilder_.getMessage(index); } } + /** * * @@ -1284,6 +1314,7 @@ public Builder setWrites(int index, com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -1308,6 +1339,7 @@ public Builder setWrites(int index, com.google.firestore.v1.Write.Builder builde } return this; } + /** * * @@ -1335,6 +1367,7 @@ public Builder addWrites(com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -1362,6 +1395,7 @@ public Builder addWrites(int index, com.google.firestore.v1.Write value) { } return this; } + /** * * @@ -1386,6 +1420,7 @@ public Builder addWrites(com.google.firestore.v1.Write.Builder builderForValue) } return this; } + /** * * @@ -1410,6 +1445,7 @@ public Builder addWrites(int index, com.google.firestore.v1.Write.Builder builde } return this; } + /** * * @@ -1435,6 +1471,7 @@ public Builder addAllWrites( } return this; } + /** * * @@ -1459,6 +1496,7 @@ public Builder clearWrites() { } return this; } + /** * * @@ -1483,6 +1521,7 @@ public Builder removeWrites(int index) { } return this; } + /** * * @@ -1500,6 +1539,7 @@ public Builder removeWrites(int index) { public com.google.firestore.v1.Write.Builder getWritesBuilder(int index) { return getWritesFieldBuilder().getBuilder(index); } + /** * * @@ -1521,6 +1561,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return writesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1543,6 +1584,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return java.util.Collections.unmodifiableList(writes_); } } + /** * * @@ -1560,6 +1602,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { public com.google.firestore.v1.Write.Builder addWritesBuilder() { return getWritesFieldBuilder().addBuilder(com.google.firestore.v1.Write.getDefaultInstance()); } + /** * * @@ -1578,6 +1621,7 @@ public com.google.firestore.v1.Write.Builder addWritesBuilder(int index) { return getWritesFieldBuilder() .addBuilder(index, com.google.firestore.v1.Write.getDefaultInstance()); } + /** * * @@ -1614,6 +1658,7 @@ public java.util.List getWritesBuilderLis } private com.google.protobuf.ByteString streamToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1642,6 +1687,7 @@ public java.util.List getWritesBuilderLis public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } + /** * * @@ -1676,6 +1722,7 @@ public Builder setStreamToken(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1732,6 +1779,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1748,12 +1796,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -1767,6 +1817,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1787,6 +1838,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1813,6 +1865,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1829,12 +1882,14 @@ public Builder removeLabels(java.lang.String key) { internalGetMutableLabels().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000010; return internalGetMutableLabels().getMutableMap(); } + /** * * @@ -1855,6 +1910,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000010; return this; } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java index 54e3b5d36..d00b557d6 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface WriteRequestOrBuilder @@ -38,6 +38,7 @@ public interface WriteRequestOrBuilder * @return The database. */ java.lang.String getDatabase(); + /** * * @@ -67,6 +68,7 @@ public interface WriteRequestOrBuilder * @return The streamId. */ java.lang.String getStreamId(); + /** * * @@ -97,6 +99,7 @@ public interface WriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 3; */ java.util.List getWritesList(); + /** * * @@ -112,6 +115,7 @@ public interface WriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 3; */ com.google.firestore.v1.Write getWrites(int index); + /** * * @@ -127,6 +131,7 @@ public interface WriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 3; */ int getWritesCount(); + /** * * @@ -142,6 +147,7 @@ public interface WriteRequestOrBuilder * repeated .google.firestore.v1.Write writes = 3; */ java.util.List getWritesOrBuilderList(); + /** * * @@ -194,6 +200,7 @@ public interface WriteRequestOrBuilder * map<string, string> labels = 5; */ int getLabelsCount(); + /** * * @@ -204,9 +211,11 @@ public interface WriteRequestOrBuilder * map<string, string> labels = 5; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -217,6 +226,7 @@ public interface WriteRequestOrBuilder * map<string, string> labels = 5; */ java.util.Map getLabelsMap(); + /** * * @@ -231,6 +241,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java index 3925446d8..0439654f5 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class WriteResponse extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.WriteResponse) WriteResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use WriteResponse.newBuilder() to construct. private WriteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object streamId_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getStreamId() { return s; } } + /** * * @@ -121,6 +124,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { public static final int STREAM_TOKEN_FIELD_NUMBER = 2; private com.google.protobuf.ByteString streamToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -144,6 +148,7 @@ public com.google.protobuf.ByteString getStreamToken() { @SuppressWarnings("serial") private java.util.List writeResults_; + /** * * @@ -160,6 +165,7 @@ public com.google.protobuf.ByteString getStreamToken() { public java.util.List getWriteResultsList() { return writeResults_; } + /** * * @@ -177,6 +183,7 @@ public java.util.List getWriteResultsList() getWriteResultsOrBuilderList() { return writeResults_; } + /** * * @@ -193,6 +200,7 @@ public java.util.List getWriteResultsList() public int getWriteResultsCount() { return writeResults_.size(); } + /** * * @@ -209,6 +217,7 @@ public int getWriteResultsCount() { public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResults_.get(index); } + /** * * @@ -228,6 +237,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int public static final int COMMIT_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp commitTime_; + /** * * @@ -244,6 +254,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int public boolean hasCommitTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -260,6 +271,7 @@ public boolean hasCommitTime() { public com.google.protobuf.Timestamp getCommitTime() { return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; } + /** * * @@ -466,6 +478,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -752,6 +765,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object streamId_ = ""; + /** * * @@ -775,6 +789,7 @@ public java.lang.String getStreamId() { return (java.lang.String) ref; } } + /** * * @@ -798,6 +813,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -820,6 +836,7 @@ public Builder setStreamId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -838,6 +855,7 @@ public Builder clearStreamId() { onChanged(); return this; } + /** * * @@ -863,6 +881,7 @@ public Builder setStreamIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString streamToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -881,6 +900,7 @@ public Builder setStreamIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } + /** * * @@ -905,6 +925,7 @@ public Builder setStreamToken(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -961,6 +982,7 @@ public java.util.List getWriteResultsList() return writeResultsBuilder_.getMessageList(); } } + /** * * @@ -980,6 +1002,7 @@ public int getWriteResultsCount() { return writeResultsBuilder_.getCount(); } } + /** * * @@ -999,6 +1022,7 @@ public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResultsBuilder_.getMessage(index); } } + /** * * @@ -1024,6 +1048,7 @@ public Builder setWriteResults(int index, com.google.firestore.v1.WriteResult va } return this; } + /** * * @@ -1047,6 +1072,7 @@ public Builder setWriteResults( } return this; } + /** * * @@ -1072,6 +1098,7 @@ public Builder addWriteResults(com.google.firestore.v1.WriteResult value) { } return this; } + /** * * @@ -1097,6 +1124,7 @@ public Builder addWriteResults(int index, com.google.firestore.v1.WriteResult va } return this; } + /** * * @@ -1119,6 +1147,7 @@ public Builder addWriteResults(com.google.firestore.v1.WriteResult.Builder build } return this; } + /** * * @@ -1142,6 +1171,7 @@ public Builder addWriteResults( } return this; } + /** * * @@ -1165,6 +1195,7 @@ public Builder addAllWriteResults( } return this; } + /** * * @@ -1187,6 +1218,7 @@ public Builder clearWriteResults() { } return this; } + /** * * @@ -1209,6 +1241,7 @@ public Builder removeWriteResults(int index) { } return this; } + /** * * @@ -1224,6 +1257,7 @@ public Builder removeWriteResults(int index) { public com.google.firestore.v1.WriteResult.Builder getWriteResultsBuilder(int index) { return getWriteResultsFieldBuilder().getBuilder(index); } + /** * * @@ -1243,6 +1277,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int return writeResultsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1263,6 +1298,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int return java.util.Collections.unmodifiableList(writeResults_); } } + /** * * @@ -1279,6 +1315,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder() { return getWriteResultsFieldBuilder() .addBuilder(com.google.firestore.v1.WriteResult.getDefaultInstance()); } + /** * * @@ -1295,6 +1332,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int in return getWriteResultsFieldBuilder() .addBuilder(index, com.google.firestore.v1.WriteResult.getDefaultInstance()); } + /** * * @@ -1335,6 +1373,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int in com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> commitTimeBuilder_; + /** * * @@ -1350,6 +1389,7 @@ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int in public boolean hasCommitTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1371,6 +1411,7 @@ public com.google.protobuf.Timestamp getCommitTime() { return commitTimeBuilder_.getMessage(); } } + /** * * @@ -1394,6 +1435,7 @@ public Builder setCommitTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1414,6 +1456,7 @@ public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1442,6 +1485,7 @@ public Builder mergeCommitTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1462,6 +1506,7 @@ public Builder clearCommitTime() { onChanged(); return this; } + /** * * @@ -1477,6 +1522,7 @@ public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() { onChanged(); return getCommitTimeFieldBuilder().getBuilder(); } + /** * * @@ -1496,6 +1542,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { : commitTime_; } } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponseOrBuilder.java index 364445bcb..59d0ce455 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponseOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponseOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/firestore.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface WriteResponseOrBuilder @@ -37,6 +37,7 @@ public interface WriteResponseOrBuilder * @return The streamId. */ java.lang.String getStreamId(); + /** * * @@ -80,6 +81,7 @@ public interface WriteResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 3; */ java.util.List getWriteResultsList(); + /** * * @@ -93,6 +95,7 @@ public interface WriteResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 3; */ com.google.firestore.v1.WriteResult getWriteResults(int index); + /** * * @@ -106,6 +109,7 @@ public interface WriteResponseOrBuilder * repeated .google.firestore.v1.WriteResult write_results = 3; */ int getWriteResultsCount(); + /** * * @@ -120,6 +124,7 @@ public interface WriteResponseOrBuilder */ java.util.List getWriteResultsOrBuilderList(); + /** * * @@ -147,6 +152,7 @@ public interface WriteResponseOrBuilder * @return Whether the commitTime field is set. */ boolean hasCommitTime(); + /** * * @@ -160,6 +166,7 @@ public interface WriteResponseOrBuilder * @return The commitTime. */ com.google.protobuf.Timestamp getCommitTime(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java index aacd14307..aa6955efa 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; /** @@ -33,6 +33,7 @@ public final class WriteResult extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.firestore.v1.WriteResult) WriteResultOrBuilder { private static final long serialVersionUID = 0L; + // Use WriteResult.newBuilder() to construct. private WriteResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -66,6 +67,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int UPDATE_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp updateTime_; + /** * * @@ -85,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasUpdateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +107,7 @@ public boolean hasUpdateTime() { public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } + /** * * @@ -126,6 +130,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { @SuppressWarnings("serial") private java.util.List transformResults_; + /** * * @@ -141,6 +146,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { public java.util.List getTransformResultsList() { return transformResults_; } + /** * * @@ -157,6 +163,7 @@ public java.util.List getTransformResultsList() { getTransformResultsOrBuilderList() { return transformResults_; } + /** * * @@ -172,6 +179,7 @@ public java.util.List getTransformResultsList() { public int getTransformResultsCount() { return transformResults_.size(); } + /** * * @@ -187,6 +195,7 @@ public int getTransformResultsCount() { public com.google.firestore.v1.Value getTransformResults(int index) { return transformResults_.get(index); } + /** * * @@ -376,6 +385,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -637,6 +647,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** * * @@ -655,6 +666,7 @@ public Builder mergeFrom( public boolean hasUpdateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -679,6 +691,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { return updateTimeBuilder_.getMessage(); } } + /** * * @@ -705,6 +718,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -728,6 +742,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -759,6 +774,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -782,6 +798,7 @@ public Builder clearUpdateTime() { onChanged(); return this; } + /** * * @@ -800,6 +817,7 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } + /** * * @@ -822,6 +840,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { : updateTime_; } } + /** * * @@ -887,6 +906,7 @@ public java.util.List getTransformResultsList() { return transformResultsBuilder_.getMessageList(); } } + /** * * @@ -905,6 +925,7 @@ public int getTransformResultsCount() { return transformResultsBuilder_.getCount(); } } + /** * * @@ -923,6 +944,7 @@ public com.google.firestore.v1.Value getTransformResults(int index) { return transformResultsBuilder_.getMessage(index); } } + /** * * @@ -947,6 +969,7 @@ public Builder setTransformResults(int index, com.google.firestore.v1.Value valu } return this; } + /** * * @@ -969,6 +992,7 @@ public Builder setTransformResults( } return this; } + /** * * @@ -993,6 +1017,7 @@ public Builder addTransformResults(com.google.firestore.v1.Value value) { } return this; } + /** * * @@ -1017,6 +1042,7 @@ public Builder addTransformResults(int index, com.google.firestore.v1.Value valu } return this; } + /** * * @@ -1038,6 +1064,7 @@ public Builder addTransformResults(com.google.firestore.v1.Value.Builder builder } return this; } + /** * * @@ -1060,6 +1087,7 @@ public Builder addTransformResults( } return this; } + /** * * @@ -1082,6 +1110,7 @@ public Builder addAllTransformResults( } return this; } + /** * * @@ -1103,6 +1132,7 @@ public Builder clearTransformResults() { } return this; } + /** * * @@ -1124,6 +1154,7 @@ public Builder removeTransformResults(int index) { } return this; } + /** * * @@ -1138,6 +1169,7 @@ public Builder removeTransformResults(int index) { public com.google.firestore.v1.Value.Builder getTransformResultsBuilder(int index) { return getTransformResultsFieldBuilder().getBuilder(index); } + /** * * @@ -1156,6 +1188,7 @@ public com.google.firestore.v1.ValueOrBuilder getTransformResultsOrBuilder(int i return transformResultsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1175,6 +1208,7 @@ public com.google.firestore.v1.ValueOrBuilder getTransformResultsOrBuilder(int i return java.util.Collections.unmodifiableList(transformResults_); } } + /** * * @@ -1190,6 +1224,7 @@ public com.google.firestore.v1.Value.Builder addTransformResultsBuilder() { return getTransformResultsFieldBuilder() .addBuilder(com.google.firestore.v1.Value.getDefaultInstance()); } + /** * * @@ -1205,6 +1240,7 @@ public com.google.firestore.v1.Value.Builder addTransformResultsBuilder(int inde return getTransformResultsFieldBuilder() .addBuilder(index, com.google.firestore.v1.Value.getDefaultInstance()); } + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java index c4372f583..505783c7f 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/write.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.7 package com.google.firestore.v1; public interface WriteResultOrBuilder @@ -40,6 +40,7 @@ public interface WriteResultOrBuilder * @return Whether the updateTime field is set. */ boolean hasUpdateTime(); + /** * * @@ -56,6 +57,7 @@ public interface WriteResultOrBuilder * @return The updateTime. */ com.google.protobuf.Timestamp getUpdateTime(); + /** * * @@ -83,6 +85,7 @@ public interface WriteResultOrBuilder * repeated .google.firestore.v1.Value transform_results = 2; */ java.util.List getTransformResultsList(); + /** * * @@ -95,6 +98,7 @@ public interface WriteResultOrBuilder * repeated .google.firestore.v1.Value transform_results = 2; */ com.google.firestore.v1.Value getTransformResults(int index); + /** * * @@ -107,6 +111,7 @@ public interface WriteResultOrBuilder * repeated .google.firestore.v1.Value transform_results = 2; */ int getTransformResultsCount(); + /** * * @@ -120,6 +125,7 @@ public interface WriteResultOrBuilder */ java.util.List getTransformResultsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto index 52dc85ca9..44ac35e2f 100644 --- a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto @@ -129,6 +129,32 @@ message Value { // A map value. MapValue map_value = 6; + + // Value which references a field. + // + // This is considered relative (vs absolute) since it only refers to a field + // and not a field within a particular document. + // + // **Requires:** + // + // * Must follow [field reference][FieldReference.field_path] limitations. + // + // * Not allowed to be used when writing documents. + string field_reference_value = 19; + + // A value that represents an unevaluated expression. + // + // **Requires:** + // + // * Not allowed to be used when writing documents. + Function function_value = 20; + + // A value that represents an unevaluated pipeline. + // + // **Requires:** + // + // * Not allowed to be used when writing documents. + Pipeline pipeline_value = 21; } } @@ -148,3 +174,67 @@ message MapValue { // not exceed 1,500 bytes and cannot be empty. map fields = 1; } + +// Represents an unevaluated scalar expression. +// +// For example, the expression `like(user_name, "%alice%")` is represented as: +// +// ``` +// name: "like" +// args { field_reference: "user_name" } +// args { string_value: "%alice%" } +// ``` +message Function { + // Required. The name of the function to evaluate. + // + // **Requires:** + // + // * must be in snake case (lower case with underscore separator). + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ordered list of arguments the given function expects. + repeated Value args = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional named arguments that certain functions may support. + map options = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A Firestore query represented as an ordered list of operations / stages. +message Pipeline { + // A single operation within a pipeline. + // + // A stage is made up of a unique name, and a list of arguments. The exact + // number of arguments & types is dependent on the stage type. + // + // To give an example, the stage `filter(state = "MD")` would be encoded as: + // + // ``` + // name: "filter" + // args { + // function_value { + // name: "eq" + // args { field_reference_value: "state" } + // args { string_value: "MD" } + // } + // } + // ``` + // + // See public documentation for the full list. + message Stage { + // Required. The name of the stage to evaluate. + // + // **Requires:** + // + // * must be in snake case (lower case with underscore separator). + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ordered list of arguments the given stage expects. + repeated Value args = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional named arguments that certain functions may support. + map options = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Ordered list of stages to evaluate. + repeated Stage stages = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/explain_stats.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/explain_stats.proto new file mode 100644 index 000000000..6a3e5fb37 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/explain_stats.proto @@ -0,0 +1,38 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.firestore.v1; + +import "google/protobuf/any.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb"; +option java_multiple_files = true; +option java_outer_classname = "ExplainStatsProto"; +option java_package = "com.google.firestore.v1"; +option php_namespace = "Google\\Cloud\\Firestore\\V1"; +option ruby_package = "Google::Cloud::Firestore::V1"; + +// Specification of Firestore Explain Stats fields. + +// Explain stats for an RPC request, includes both the optimized plan and +// execution stats. +message ExplainStats { + // The format depends on the `output_format` options in the request. + // + // The only option today is `TEXT`, which is a `google.protobuf.StringValue`. + google.protobuf.Any data = 1; +} diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto index 2ed6bf070..182b4c07c 100644 --- a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto @@ -19,9 +19,12 @@ package google.firestore.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/routing.proto"; import "google/firestore/v1/aggregation_result.proto"; import "google/firestore/v1/common.proto"; import "google/firestore/v1/document.proto"; +import "google/firestore/v1/explain_stats.proto"; +import "google/firestore/v1/pipeline.proto"; import "google/firestore/v1/query.proto"; import "google/firestore/v1/query_profile.proto"; import "google/firestore/v1/write.proto"; @@ -140,6 +143,25 @@ service Firestore { }; } + // Executes a pipeline query. + rpc ExecutePipeline(ExecutePipelineRequest) + returns (stream ExecutePipelineResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:executePipeline" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "database" + path_template: "projects/{project_id=*}/**" + } + routing_parameters { + field: "database" + path_template: "projects/*/databases/{database_id=*}/**" + } + }; + } + // Runs an aggregation query. // // Rather than producing [Document][google.firestore.v1.Document] results like @@ -624,6 +646,81 @@ message RunQueryResponse { ExplainMetrics explain_metrics = 11; } +// The request for +// [Firestore.ExecutePipeline][google.firestore.v1.Firestore.ExecutePipeline]. +message ExecutePipelineRequest { + // Required. Database identifier, in the form + // `projects/{project}/databases/{database}`. + string database = 1 [(google.api.field_behavior) = REQUIRED]; + + oneof pipeline_type { + // A pipelined operation. + StructuredPipeline structured_pipeline = 2; + } + + // Optional consistency arguments, defaults to strong consistency. + oneof consistency_selector { + // Run the query within an already active transaction. + // + // The value here is the opaque transaction ID to execute the query in. + bytes transaction = 5; + + // Execute the pipeline in a new transaction. + // + // The identifier of the newly created transaction will be returned in the + // first response on the stream. This defaults to a read-only transaction. + TransactionOptions new_transaction = 6; + + // Execute the pipeline in a snapshot transaction at the given time. + // + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. + google.protobuf.Timestamp read_time = 7; + } +} + +// The response for [Firestore.Execute][]. +message ExecutePipelineResponse { + // Newly created transaction identifier. + // + // This field is only specified as part of the first response from the server, + // alongside the `results` field when the original request specified + // [ExecuteRequest.new_transaction][]. + bytes transaction = 1; + + // An ordered batch of results returned executing a pipeline. + // + // The batch size is variable, and can even be zero for when only a partial + // progress message is returned. + // + // The fields present in the returned documents are only those that were + // explicitly requested in the pipeline, this include those like + // [`__name__`][google.firestore.v1.Document.name] & + // [`__update_time__`][google.firestore.v1.Document.update_time]. This is + // explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + // RPCs which always return such fields even when they are not specified in + // the [`mask`][google.firestore.v1.DocumentMask]. + repeated Document results = 2; + + // The time at which the document(s) were read. + // + // This may be monotonically increasing; in this case, the previous documents + // in the result stream are guaranteed not to have changed between their + // `execution_time` and this one. + // + // If the query returns no results, a response with `execution_time` and no + // `results` will be sent, and this represents the time at which the operation + // was run. + google.protobuf.Timestamp execution_time = 3; + + // Query explain stats. + // + // Contains all metadata related to pipeline planning and execution, specific + // contents depend on the supplied pipeline options. + ExplainStats explain_stats = 4; +} + // The request for // [Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery]. message RunAggregationQueryRequest { diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/pipeline.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/pipeline.proto new file mode 100644 index 000000000..0fde1c65e --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/pipeline.proto @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.firestore.v1; + +import "google/api/field_behavior.proto"; +import "google/firestore/v1/document.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb"; +option java_multiple_files = true; +option java_outer_classname = "PipelineProto"; +option java_package = "com.google.firestore.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\V1"; +option ruby_package = "Google::Cloud::Firestore::V1"; + +// A Firestore query represented as an ordered list of operations / stages. +// +// This is considered the top-level function which plans & executes a query. +// It is logically equivalent to `query(stages, options)`, but prevents the +// client from having to build a function wrapper. +message StructuredPipeline { + // Required. The pipeline query to execute. + Pipeline pipeline = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Optional query-level arguments. + // + map options = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto index 3b2280076..f260bad08 100644 --- a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto @@ -38,6 +38,7 @@ option ruby_package = "Google::Cloud::Firestore::V1"; // 4. order_by + start_at + end_at // 5. offset // 6. limit +// 7. find_nearest message StructuredQuery { // A selection of a collection, such as `messages as m1`. message CollectionSelector { @@ -324,8 +325,8 @@ message StructuredQuery { // Since DOT_PRODUCT distances increase when the vectors are more similar, // the comparison is inverted. // - // For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - // For DOT_PRODUCT: WHERE distance >= distance_threshold + // * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + // * For DOT_PRODUCT: WHERE distance >= distance_threshold google.protobuf.DoubleValue distance_threshold = 6 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/tools/api.txt b/tools/api.txt index ef31d240e..6f0e2f29b 100644 --- a/tools/api.txt +++ b/tools/api.txt @@ -3,85 +3,85 @@ package com.google.cloud.firestore { public abstract class AggregateField { ctor public AggregateField(); - method @NonNull public static com.google.cloud.firestore.AggregateField.AverageAggregateField average(@NonNull com.google.cloud.firestore.FieldPath); - method @NonNull public static com.google.cloud.firestore.AggregateField.AverageAggregateField average(@NonNull String); - method @NonNull public static com.google.cloud.firestore.AggregateField.CountAggregateField count(); + method public static com.google.cloud.firestore.AggregateField.AverageAggregateField average(com.google.cloud.firestore.FieldPath); + method public static com.google.cloud.firestore.AggregateField.AverageAggregateField average(String); + method public static com.google.cloud.firestore.AggregateField.CountAggregateField count(); method public boolean equals(Object); method public int hashCode(); - method @NonNull public static com.google.cloud.firestore.AggregateField.SumAggregateField sum(@NonNull com.google.cloud.firestore.FieldPath); - method @NonNull public static com.google.cloud.firestore.AggregateField.SumAggregateField sum(@NonNull String); + method public static com.google.cloud.firestore.AggregateField.SumAggregateField sum(com.google.cloud.firestore.FieldPath); + method public static com.google.cloud.firestore.AggregateField.SumAggregateField sum(String); } public static class AggregateField.AverageAggregateField extends com.google.cloud.firestore.AggregateField { - method @NonNull public String getOperator(); + method public String getOperator(); } public static class AggregateField.CountAggregateField extends com.google.cloud.firestore.AggregateField { - method @NonNull public String getOperator(); + method public String getOperator(); } public static class AggregateField.SumAggregateField extends com.google.cloud.firestore.AggregateField { - method @NonNull public String getOperator(); + method public String getOperator(); } public class AggregateQuery { method public boolean equals(Object); - method @NonNull public ApiFuture> explain(com.google.cloud.firestore.ExplainOptions); - method @NonNull public static com.google.cloud.firestore.AggregateQuery fromProto(com.google.cloud.firestore.Firestore, RunAggregationQueryRequest); - method @NonNull public ApiFuture get(); - method @NonNull public com.google.cloud.firestore.Query getQuery(); + method public ApiFuture> explain(com.google.cloud.firestore.ExplainOptions); + method public static com.google.cloud.firestore.AggregateQuery fromProto(com.google.cloud.firestore.Firestore, RunAggregationQueryRequest); + method public ApiFuture get(); + method public com.google.cloud.firestore.Query getQuery(); method public int hashCode(); - method @NonNull public RunAggregationQueryRequest toProto(); + method public RunAggregationQueryRequest toProto(); } public class AggregateQuerySnapshot { method public boolean equals(Object); - method @Nullable public Object get(@NonNull com.google.cloud.firestore.AggregateField); - method @Nullable public Double get(@NonNull com.google.cloud.firestore.AggregateField.AverageAggregateField); - method public long get(@NonNull com.google.cloud.firestore.AggregateField.CountAggregateField); + method @Nullable public Object get(com.google.cloud.firestore.AggregateField); + method @Nullable public Double get(com.google.cloud.firestore.AggregateField.AverageAggregateField); + method public long get(com.google.cloud.firestore.AggregateField.CountAggregateField); method public long getCount(); - method @Nullable public Double getDouble(@NonNull com.google.cloud.firestore.AggregateField); - method @Nullable public Long getLong(@NonNull com.google.cloud.firestore.AggregateField); - method @NonNull public com.google.cloud.firestore.AggregateQuery getQuery(); - method @NonNull public Timestamp getReadTime(); + method @Nullable public Double getDouble(com.google.cloud.firestore.AggregateField); + method @Nullable public Long getLong(com.google.cloud.firestore.AggregateField); + method public com.google.cloud.firestore.AggregateQuery getQuery(); + method public Timestamp getReadTime(); method public int hashCode(); } public abstract class BasePath> { ctor public BasePath(); - method public int compareTo(@NonNull B); + method public int compareTo(B); } public final class Blob { method public boolean equals(Object); - method @NonNull public static com.google.cloud.firestore.Blob fromByteString(@NonNull ByteString); - method @NonNull public static com.google.cloud.firestore.Blob fromBytes(@NonNull byte[]); + method public static com.google.cloud.firestore.Blob fromByteString(ByteString); + method public static com.google.cloud.firestore.Blob fromBytes(byte[]); method public int hashCode(); - method @NonNull public ByteString toByteString(); - method @NonNull public byte[] toBytes(); + method public ByteString toByteString(); + method public byte[] toBytes(); } public final class BulkWriter { method public void addWriteErrorListener(com.google.cloud.firestore.BulkWriter.WriteErrorCallback); - method public void addWriteErrorListener(@NonNull Executor, com.google.cloud.firestore.BulkWriter.WriteErrorCallback); + method public void addWriteErrorListener(Executor, com.google.cloud.firestore.BulkWriter.WriteErrorCallback); method public void addWriteResultListener(com.google.cloud.firestore.BulkWriter.WriteResultCallback); - method public void addWriteResultListener(@NonNull Executor, com.google.cloud.firestore.BulkWriter.WriteResultCallback); + method public void addWriteResultListener(Executor, com.google.cloud.firestore.BulkWriter.WriteResultCallback); method public void close(); - method @NonNull public ApiFuture create(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map); - method @NonNull public ApiFuture create(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Object); - method @NonNull public ApiFuture delete(@NonNull com.google.cloud.firestore.DocumentReference); - method @NonNull public ApiFuture delete(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.Precondition); - method @NonNull public ApiFuture flush(); - method @NonNull public ApiFuture set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map); - method @NonNull public ApiFuture set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map, @NonNull com.google.cloud.firestore.SetOptions); - method @NonNull public ApiFuture set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Object); - method @NonNull public ApiFuture set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Object, @NonNull com.google.cloud.firestore.SetOptions); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.Precondition, @NonNull com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.Precondition, @NonNull String, @Nullable Object, Object...); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map, @NonNull com.google.cloud.firestore.Precondition); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull String, @Nullable Object, Object...); + method public ApiFuture create(com.google.cloud.firestore.DocumentReference, Map); + method public ApiFuture create(com.google.cloud.firestore.DocumentReference, Object); + method public ApiFuture delete(com.google.cloud.firestore.DocumentReference); + method public ApiFuture delete(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.Precondition); + method public ApiFuture flush(); + method public ApiFuture set(com.google.cloud.firestore.DocumentReference, Map); + method public ApiFuture set(com.google.cloud.firestore.DocumentReference, Map, com.google.cloud.firestore.SetOptions); + method public ApiFuture set(com.google.cloud.firestore.DocumentReference, Object); + method public ApiFuture set(com.google.cloud.firestore.DocumentReference, Object, com.google.cloud.firestore.SetOptions); + method public ApiFuture update(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); + method public ApiFuture update(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.Precondition, com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); + method public ApiFuture update(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.Precondition, String, @Nullable Object, Object...); + method public ApiFuture update(com.google.cloud.firestore.DocumentReference, Map); + method public ApiFuture update(com.google.cloud.firestore.DocumentReference, Map, com.google.cloud.firestore.Precondition); + method public ApiFuture update(com.google.cloud.firestore.DocumentReference, String, @Nullable Object, Object...); field public static final int MAX_BATCH_SIZE = 20; // 0x14 field public static final int MAX_RETRY_ATTEMPTS = 10; // 0xa field public static final int RETRY_MAX_BATCH_SIZE = 10; // 0xa @@ -116,7 +116,7 @@ package com.google.cloud.firestore { public abstract static class BulkWriterOptions.Builder { ctor public BulkWriterOptions.Builder(); method public abstract com.google.cloud.firestore.BulkWriterOptions autoBuild(); - method @NonNull public com.google.cloud.firestore.BulkWriterOptions build(); + method public com.google.cloud.firestore.BulkWriterOptions build(); method public abstract com.google.cloud.firestore.BulkWriterOptions.Builder setExecutor(@Nullable ScheduledExecutorService); method public com.google.cloud.firestore.BulkWriterOptions.Builder setInitialOpsPerSecond(int); method public com.google.cloud.firestore.BulkWriterOptions.Builder setMaxOpsPerSecond(int); @@ -129,22 +129,22 @@ package com.google.cloud.firestore { } public class CollectionReference extends com.google.cloud.firestore.Query { - method @NonNull public ApiFuture add(@NonNull Map); + method public ApiFuture add(Map); method public ApiFuture add(Object); - method @NonNull public com.google.cloud.firestore.DocumentReference document(); - method @NonNull public com.google.cloud.firestore.DocumentReference document(@NonNull String); - method @NonNull public String getId(); + method public com.google.cloud.firestore.DocumentReference document(); + method public com.google.cloud.firestore.DocumentReference document(String); + method public String getId(); method @Nullable public com.google.cloud.firestore.DocumentReference getParent(); - method @NonNull public String getPath(); - method @NonNull public Iterable listDocuments(); + method public String getPath(); + method public Iterable listDocuments(); } public class DocumentChange { method public boolean equals(Object); - method @NonNull public com.google.cloud.firestore.QueryDocumentSnapshot getDocument(); + method public com.google.cloud.firestore.QueryDocumentSnapshot getDocument(); method public int getNewIndex(); method public int getOldIndex(); - method @NonNull public com.google.cloud.firestore.DocumentChange.Type getType(); + method public com.google.cloud.firestore.DocumentChange.Type getType(); method public int hashCode(); } @@ -155,60 +155,61 @@ package com.google.cloud.firestore { } public class DocumentReference { - method @NonNull public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(@NonNull com.google.cloud.firestore.EventListener); - method @NonNull public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(@NonNull Executor, @NonNull com.google.cloud.firestore.EventListener); - method @NonNull public com.google.cloud.firestore.CollectionReference collection(@NonNull String); - method @NonNull public ApiFuture create(@NonNull Map); - method @NonNull public ApiFuture create(@NonNull Object); - method @NonNull public ApiFuture delete(); - method @NonNull public ApiFuture delete(@NonNull com.google.cloud.firestore.Precondition); + method public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(com.google.cloud.firestore.EventListener); + method public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(Executor, com.google.cloud.firestore.EventListener); + method public com.google.cloud.firestore.CollectionReference collection(String); + method public ApiFuture create(Map); + method public ApiFuture create(Object); + method public ApiFuture delete(); + method public ApiFuture delete(com.google.cloud.firestore.Precondition); method public boolean equals(Object); - method @NonNull public ApiFuture get(); - method @NonNull public ApiFuture get(com.google.cloud.firestore.FieldMask); - method @NonNull public com.google.cloud.firestore.Firestore getFirestore(); - method @NonNull public String getId(); - method @NonNull public com.google.cloud.firestore.CollectionReference getParent(); - method @NonNull public String getPath(); + method public ApiFuture get(); + method public ApiFuture get(com.google.cloud.firestore.FieldMask); + method public com.google.cloud.firestore.Firestore getFirestore(); + method public String getId(); + method public com.google.cloud.firestore.CollectionReference getParent(); + method public String getPath(); method public int hashCode(); - method @NonNull public Iterable listCollections(); - method @NonNull public ApiFuture set(@NonNull Map); - method @NonNull public ApiFuture set(@NonNull Map, @NonNull com.google.cloud.firestore.SetOptions); - method @NonNull public ApiFuture set(@NonNull Object); - method @NonNull public ApiFuture set(@NonNull Object, @NonNull com.google.cloud.firestore.SetOptions); + method public Iterable listCollections(); + method public ApiFuture set(Map); + method public ApiFuture set(Map, com.google.cloud.firestore.SetOptions); + method public ApiFuture set(Object); + method public ApiFuture set(Object, com.google.cloud.firestore.SetOptions); method public String toString(); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.Precondition, @NonNull com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); - method @NonNull public ApiFuture update(@NonNull com.google.cloud.firestore.Precondition, @NonNull String, @Nullable Object, Object...); - method @NonNull public ApiFuture update(@NonNull Map); - method @NonNull public ApiFuture update(@NonNull Map, com.google.cloud.firestore.Precondition); - method @NonNull public ApiFuture update(@NonNull String, @Nullable Object, Object...); + method public ApiFuture update(com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); + method public ApiFuture update(com.google.cloud.firestore.Precondition, com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); + method public ApiFuture update(com.google.cloud.firestore.Precondition, String, @Nullable Object, Object...); + method public ApiFuture update(Map); + method public ApiFuture update(Map, com.google.cloud.firestore.Precondition); + method public ApiFuture update(String, @Nullable Object, Object...); } public class DocumentSnapshot { - method public boolean contains(@NonNull com.google.cloud.firestore.FieldPath); - method public boolean contains(@NonNull String); + method public boolean contains(com.google.cloud.firestore.FieldPath); + method public boolean contains(String); method public boolean equals(Object); method public boolean exists(); - method @Nullable public Object get(@NonNull com.google.cloud.firestore.FieldPath); - method @Nullable public T get(@NonNull com.google.cloud.firestore.FieldPath, Class); - method @Nullable public Object get(@NonNull String); - method @Nullable public T get(@NonNull String, @NonNull Class); - method @Nullable public com.google.cloud.firestore.Blob getBlob(@NonNull String); - method @Nullable public Boolean getBoolean(@NonNull String); + method @Nullable public Object get(com.google.cloud.firestore.FieldPath); + method @Nullable public T get(com.google.cloud.firestore.FieldPath, Class); + method @Nullable public Object get(String); + method @Nullable public T get(String, Class); + method @Nullable public com.google.cloud.firestore.Blob getBlob(String); + method @Nullable public Boolean getBoolean(String); method @Nullable public Timestamp getCreateTime(); method @Nullable public Map getData(); - method @Nullable public Date getDate(@NonNull String); - method @Nullable public Double getDouble(@NonNull String); - method @Nullable public com.google.cloud.firestore.GeoPoint getGeoPoint(@NonNull String); - method @NonNull public String getId(); - method @Nullable public Long getLong(@NonNull String); + method @Nullable public Date getDate(String); + method @Nullable public Double getDouble(String); + method @Nullable public com.google.cloud.firestore.GeoPoint getGeoPoint(String); + method public String getId(); + method @Nullable public Long getLong(String); method @Nullable public Timestamp getReadTime(); - method @NonNull public com.google.cloud.firestore.DocumentReference getReference(); - method @Nullable public String getString(@NonNull String); - method @Nullable public Timestamp getTimestamp(@NonNull String); + method public com.google.cloud.firestore.DocumentReference getReference(); + method @Nullable public String getString(String); + method @Nullable public Timestamp getTimestamp(String); method @Nullable public Timestamp getUpdateTime(); + method @Nullable public com.google.cloud.firestore.VectorValue getVectorValue(String); method public int hashCode(); - method @Nullable public T toObject(@NonNull Class); + method @Nullable public T toObject(Class); method public String toString(); } @@ -217,15 +218,15 @@ package com.google.cloud.firestore { } public final class ExecutionStats { - method @NonNull public Map getDebugStats(); - method @NonNull public Duration getExecutionDuration(); + method public Map getDebugStats(); + method public Duration getExecutionDuration(); method public long getReadOperations(); method public long getResultsReturned(); } public final class ExplainMetrics { method @Nullable public com.google.cloud.firestore.ExecutionStats getExecutionStats(); - method @NonNull public com.google.cloud.firestore.PlanSummary getPlanSummary(); + method public com.google.cloud.firestore.PlanSummary getPlanSummary(); } public abstract class ExplainOptions { @@ -243,82 +244,90 @@ package com.google.cloud.firestore { } public final class ExplainResults { - method @NonNull public com.google.cloud.firestore.ExplainMetrics getMetrics(); + method public com.google.cloud.firestore.ExplainMetrics getMetrics(); method @Nullable public T getSnapshot(); } + public final class ExplainStats { + method public Any getRawData(); + method public String getText(); + } + public final class FieldMask { - method @NonNull public static com.google.cloud.firestore.FieldMask of(com.google.cloud.firestore.FieldPath...); - method @NonNull public static com.google.cloud.firestore.FieldMask of(String...); + method public static com.google.cloud.firestore.FieldMask of(com.google.cloud.firestore.FieldPath...); + method public static com.google.cloud.firestore.FieldMask of(String...); } public abstract class FieldPath extends com.google.cloud.firestore.BasePath { ctor public FieldPath(); method public static com.google.cloud.firestore.FieldPath documentId(); + method public static com.google.cloud.firestore.FieldPath fromDotSeparatedString(String); method public static com.google.cloud.firestore.FieldPath fromServerFormat(String); - method public static com.google.cloud.firestore.FieldPath of(@NonNull String...); + method public static com.google.cloud.firestore.FieldPath of(String...); method public String toString(); } public abstract class FieldValue { - method @NonNull public static com.google.cloud.firestore.FieldValue arrayRemove(@NonNull Object...); - method @NonNull public static com.google.cloud.firestore.FieldValue arrayUnion(@NonNull Object...); - method @NonNull public static com.google.cloud.firestore.FieldValue delete(); + method public static com.google.cloud.firestore.FieldValue arrayRemove(Object...); + method public static com.google.cloud.firestore.FieldValue arrayUnion(Object...); + method public static com.google.cloud.firestore.FieldValue delete(); method public boolean equals(Object); method public int hashCode(); - method @NonNull public static com.google.cloud.firestore.FieldValue increment(double); - method @NonNull public static com.google.cloud.firestore.FieldValue increment(long); - method @NonNull public static com.google.cloud.firestore.FieldValue serverTimestamp(); + method public static com.google.cloud.firestore.FieldValue increment(double); + method public static com.google.cloud.firestore.FieldValue increment(long); + method public static com.google.cloud.firestore.FieldValue serverTimestamp(); + method public static com.google.cloud.firestore.VectorValue vector(double[]); } public class Filter { ctor public Filter(); - method @NonNull public static com.google.cloud.firestore.Filter and(com.google.cloud.firestore.Filter...); - method @NonNull public static com.google.cloud.firestore.Filter arrayContains(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter arrayContains(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter arrayContainsAny(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter arrayContainsAny(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter equalTo(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter equalTo(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter greaterThan(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter greaterThan(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter greaterThanOrEqualTo(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter greaterThanOrEqualTo(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter inArray(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter inArray(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter lessThan(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter lessThan(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter lessThanOrEqualTo(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter lessThanOrEqualTo(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter notEqualTo(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter notEqualTo(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter notInArray(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter notInArray(@NonNull String, @Nullable Object); - method @NonNull public static com.google.cloud.firestore.Filter or(com.google.cloud.firestore.Filter...); + method public static com.google.cloud.firestore.Filter and(com.google.cloud.firestore.Filter...); + method public static com.google.cloud.firestore.Filter arrayContains(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter arrayContains(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter arrayContainsAny(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter arrayContainsAny(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter equalTo(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter equalTo(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter greaterThan(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter greaterThan(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter greaterThanOrEqualTo(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter greaterThanOrEqualTo(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter inArray(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter inArray(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter lessThan(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter lessThan(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter lessThanOrEqualTo(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter lessThanOrEqualTo(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter notEqualTo(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter notEqualTo(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter notInArray(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public static com.google.cloud.firestore.Filter notInArray(String, @Nullable Object); + method public static com.google.cloud.firestore.Filter or(com.google.cloud.firestore.Filter...); } public interface Firestore { - method @NonNull public com.google.cloud.firestore.WriteBatch batch(); - method @NonNull public com.google.cloud.firestore.BulkWriter bulkWriter(); - method @NonNull public com.google.cloud.firestore.BulkWriter bulkWriter(com.google.cloud.firestore.BulkWriterOptions); - method @NonNull public com.google.cloud.firestore.FirestoreBundle.Builder bundleBuilder(); - method @NonNull public com.google.cloud.firestore.FirestoreBundle.Builder bundleBuilder(@NonNull String); + method public com.google.cloud.firestore.WriteBatch batch(); + method public com.google.cloud.firestore.BulkWriter bulkWriter(); + method public com.google.cloud.firestore.BulkWriter bulkWriter(com.google.cloud.firestore.BulkWriterOptions); + method public com.google.cloud.firestore.FirestoreBundle.Builder bundleBuilder(); + method public com.google.cloud.firestore.FirestoreBundle.Builder bundleBuilder(String); method public void close(); - method @NonNull public com.google.cloud.firestore.CollectionReference collection(@NonNull String); - method public com.google.cloud.firestore.CollectionGroup collectionGroup(@NonNull String); - method @NonNull public com.google.cloud.firestore.DocumentReference document(@NonNull String); - method @NonNull public ApiFuture> getAll(@NonNull com.google.cloud.firestore.DocumentReference...); - method @NonNull public ApiFuture> getAll(@NonNull com.google.cloud.firestore.DocumentReference[], @Nullable com.google.cloud.firestore.FieldMask); - method public void getAll(@NonNull com.google.cloud.firestore.DocumentReference[], @Nullable com.google.cloud.firestore.FieldMask, ApiStreamObserver); - method @NonNull public Iterable listCollections(); - method @NonNull public ApiFuture recursiveDelete(com.google.cloud.firestore.CollectionReference); - method @NonNull public ApiFuture recursiveDelete(com.google.cloud.firestore.CollectionReference, com.google.cloud.firestore.BulkWriter); - method @NonNull public ApiFuture recursiveDelete(com.google.cloud.firestore.DocumentReference); - method @NonNull public ApiFuture recursiveDelete(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.BulkWriter); - method @NonNull public ApiFuture runAsyncTransaction(@NonNull com.google.cloud.firestore.Transaction.AsyncFunction); - method @NonNull public ApiFuture runAsyncTransaction(@NonNull com.google.cloud.firestore.Transaction.AsyncFunction, @NonNull com.google.cloud.firestore.TransactionOptions); - method @NonNull public ApiFuture runTransaction(@NonNull com.google.cloud.firestore.Transaction.Function); - method @NonNull public ApiFuture runTransaction(@NonNull com.google.cloud.firestore.Transaction.Function, @NonNull com.google.cloud.firestore.TransactionOptions); + method public com.google.cloud.firestore.CollectionReference collection(String); + method public com.google.cloud.firestore.CollectionGroup collectionGroup(String); + method public com.google.cloud.firestore.DocumentReference document(String); + method public ApiFuture> getAll(com.google.cloud.firestore.DocumentReference...); + method public ApiFuture> getAll(com.google.cloud.firestore.DocumentReference[], @Nullable com.google.cloud.firestore.FieldMask); + method public void getAll(com.google.cloud.firestore.DocumentReference[], @Nullable com.google.cloud.firestore.FieldMask, ApiStreamObserver); + method public Iterable listCollections(); + method public com.google.cloud.firestore.PipelineSource pipeline(); + method public ApiFuture recursiveDelete(com.google.cloud.firestore.CollectionReference); + method public ApiFuture recursiveDelete(com.google.cloud.firestore.CollectionReference, com.google.cloud.firestore.BulkWriter); + method public ApiFuture recursiveDelete(com.google.cloud.firestore.DocumentReference); + method public ApiFuture recursiveDelete(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.BulkWriter); + method public ApiFuture runAsyncTransaction(com.google.cloud.firestore.Transaction.AsyncFunction); + method public ApiFuture runAsyncTransaction(com.google.cloud.firestore.Transaction.AsyncFunction, com.google.cloud.firestore.TransactionOptions); + method public ApiFuture runTransaction(com.google.cloud.firestore.Transaction.Function); + method public ApiFuture runTransaction(com.google.cloud.firestore.Transaction.Function, com.google.cloud.firestore.TransactionOptions); method public void shutdown(); method public void shutdownNow(); } @@ -347,42 +356,57 @@ package com.google.cloud.firestore { public interface FirestoreFactory { } + public class FirestoreOpenTelemetryOptions { + method public OpenTelemetry getOpenTelemetry(); + method public boolean isTracingEnabled(); + method public static com.google.cloud.firestore.FirestoreOpenTelemetryOptions.Builder newBuilder(); + method public com.google.cloud.firestore.FirestoreOpenTelemetryOptions.Builder toBuilder(); + } + + public static class FirestoreOpenTelemetryOptions.Builder { + method public com.google.cloud.firestore.FirestoreOpenTelemetryOptions build(); + method public com.google.cloud.firestore.FirestoreOpenTelemetryOptions.Builder setOpenTelemetry(OpenTelemetry); + method public com.google.cloud.firestore.FirestoreOpenTelemetryOptions.Builder setTracingEnabled(boolean); + } + public final class FirestoreOptions { ctor protected FirestoreOptions(com.google.cloud.firestore.FirestoreOptions.Builder); method public boolean equals(Object); method public CredentialsProvider getCredentialsProvider(); method public String getDatabaseId(); - method @NonNull public static GoogleCredentialsProvider.Builder getDefaultCredentialsProviderBuilder(); + method public static GoogleCredentialsProvider.Builder getDefaultCredentialsProviderBuilder(); method protected String getDefaultHost(); method public static com.google.cloud.firestore.FirestoreOptions getDefaultInstance(); - method @NonNull public static InstantiatingGrpcChannelProvider.Builder getDefaultTransportChannelProviderBuilder(); - method @NonNull public static GrpcTransportOptions.Builder getDefaultTransportOptionsBuilder(); + method public static InstantiatingGrpcChannelProvider.Builder getDefaultTransportChannelProviderBuilder(); + method public static GrpcTransportOptions.Builder getDefaultTransportOptionsBuilder(); method public String getEmulatorHost(); + method public com.google.cloud.firestore.FirestoreOpenTelemetryOptions getOpenTelemetryOptions(); method protected Set getScopes(); method public TransportChannelProvider getTransportChannelProvider(); method public int hashCode(); - method @NonNull public static com.google.cloud.firestore.FirestoreOptions.Builder newBuilder(); + method public static com.google.cloud.firestore.FirestoreOptions.Builder newBuilder(); method protected boolean projectIdRequired(); - method @NonNull public com.google.cloud.firestore.FirestoreOptions.Builder toBuilder(); + method public com.google.cloud.firestore.FirestoreOptions.Builder toBuilder(); } public static class FirestoreOptions.Builder { - method @NonNull public com.google.cloud.firestore.FirestoreOptions build(); - method @NonNull public com.google.cloud.firestore.FirestoreOptions.Builder setChannelProvider(@NonNull TransportChannelProvider); - method @NonNull public com.google.cloud.firestore.FirestoreOptions.Builder setCredentialsProvider(@NonNull CredentialsProvider); - method public com.google.cloud.firestore.FirestoreOptions.Builder setDatabaseId(@NonNull String); - method public com.google.cloud.firestore.FirestoreOptions.Builder setEmulatorHost(@NonNull String); - method @NonNull public com.google.cloud.firestore.FirestoreOptions.Builder setTransportOptions(@NonNull TransportOptions); + method public com.google.cloud.firestore.FirestoreOptions build(); + method public com.google.cloud.firestore.FirestoreOptions.Builder setChannelProvider(TransportChannelProvider); + method public com.google.cloud.firestore.FirestoreOptions.Builder setCredentialsProvider(CredentialsProvider); + method public com.google.cloud.firestore.FirestoreOptions.Builder setDatabaseId(String); + method public com.google.cloud.firestore.FirestoreOptions.Builder setEmulatorHost(String); + method public com.google.cloud.firestore.FirestoreOptions.Builder setOpenTelemetryOptions(com.google.cloud.firestore.FirestoreOpenTelemetryOptions); + method public com.google.cloud.firestore.FirestoreOptions.Builder setTransportOptions(TransportOptions); } public static class FirestoreOptions.DefaultFirestoreFactory implements com.google.cloud.firestore.FirestoreFactory { ctor public FirestoreOptions.DefaultFirestoreFactory(); - method @NonNull public com.google.cloud.firestore.Firestore create(@NonNull com.google.cloud.firestore.FirestoreOptions); + method public com.google.cloud.firestore.Firestore create(com.google.cloud.firestore.FirestoreOptions); } public static class FirestoreOptions.DefaultFirestoreRpcFactory implements com.google.cloud.firestore.FirestoreRpcFactory { ctor public FirestoreOptions.DefaultFirestoreRpcFactory(); - method @NonNull public com.google.cloud.firestore.spi.v1.FirestoreRpc create(@NonNull com.google.cloud.firestore.FirestoreOptions); + method public com.google.cloud.firestore.spi.v1.FirestoreRpc create(com.google.cloud.firestore.FirestoreOptions); } public static class FirestoreOptions.EmulatorCredentials { @@ -403,7 +427,7 @@ package com.google.cloud.firestore { method public double getLatitude(); method public double getLongitude(); method public int hashCode(); - method @NonNull public String toString(); + method public String toString(); } public class Internal { @@ -420,70 +444,162 @@ package com.google.cloud.firestore { method public void remove(); } + public final class Pipeline { + method public com.google.cloud.firestore.Pipeline addFields(com.google.cloud.firestore.pipeline.expressions.Selectable...); + method public com.google.cloud.firestore.Pipeline aggregate(com.google.cloud.firestore.pipeline.expressions.AliasedAggregate...); + method public com.google.cloud.firestore.Pipeline aggregate(com.google.cloud.firestore.pipeline.stages.Aggregate); + method public com.google.cloud.firestore.Pipeline distinct(com.google.cloud.firestore.pipeline.expressions.Selectable...); + method public com.google.cloud.firestore.Pipeline distinct(String...); + method public ApiFuture execute(); + method public void execute(ApiStreamObserver); + method public ApiFuture execute(com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions); + method public com.google.cloud.firestore.Pipeline findNearest(com.google.cloud.firestore.pipeline.expressions.Expr, double[], com.google.cloud.firestore.pipeline.stages.FindNearest.DistanceMeasure, com.google.cloud.firestore.pipeline.stages.FindNearestOptions); + method public com.google.cloud.firestore.Pipeline findNearest(String, double[], com.google.cloud.firestore.pipeline.stages.FindNearest.DistanceMeasure, com.google.cloud.firestore.pipeline.stages.FindNearestOptions); + method public com.google.cloud.firestore.Pipeline genericStage(String, List, com.google.cloud.firestore.pipeline.stages.GenericOptions); + method public com.google.cloud.firestore.Pipeline limit(int); + method public com.google.cloud.firestore.Pipeline offset(int); + method public com.google.cloud.firestore.Pipeline removeFields(com.google.cloud.firestore.pipeline.expressions.Field...); + method public com.google.cloud.firestore.Pipeline removeFields(String...); + method public com.google.cloud.firestore.Pipeline replaceWith(com.google.cloud.firestore.pipeline.expressions.Expr); + method public com.google.cloud.firestore.Pipeline replaceWith(String); + method public com.google.cloud.firestore.Pipeline sample(com.google.cloud.firestore.pipeline.stages.Sample); + method public com.google.cloud.firestore.Pipeline sample(int); + method public com.google.cloud.firestore.Pipeline select(com.google.cloud.firestore.pipeline.expressions.Selectable...); + method public com.google.cloud.firestore.Pipeline select(String...); + method public com.google.cloud.firestore.Pipeline sort(com.google.cloud.firestore.pipeline.expressions.Ordering...); + method public com.google.firestore.v1.Value toProtoValue(); + method public com.google.cloud.firestore.Pipeline union(com.google.cloud.firestore.Pipeline); + method public com.google.cloud.firestore.Pipeline unnest(com.google.cloud.firestore.pipeline.expressions.Selectable); + method public com.google.cloud.firestore.Pipeline unnest(String, String); + method public com.google.cloud.firestore.Pipeline unnest(String, String, com.google.cloud.firestore.pipeline.stages.UnnestOptions); + method public com.google.cloud.firestore.Pipeline where(com.google.cloud.firestore.pipeline.expressions.BooleanExpr); + } + + public final class PipelineResult { + method public boolean contains(com.google.cloud.firestore.FieldPath); + method public boolean contains(String); + method public boolean equals(Object); + method public boolean exists(); + method @Nullable public Object get(com.google.cloud.firestore.FieldPath); + method @Nullable public T get(com.google.cloud.firestore.FieldPath, Class); + method @Nullable public Object get(String); + method @Nullable public T get(String, Class); + method @Nullable public com.google.cloud.firestore.Blob getBlob(String); + method @Nullable public Boolean getBoolean(String); + method @Nullable public Timestamp getCreateTime(); + method public Map getData(); + method @Nullable public Date getDate(String); + method @Nullable public Double getDouble(String); + method @Nullable public Timestamp getExecutionTime(); + method @Nullable public com.google.cloud.firestore.GeoPoint getGeoPoint(String); + method @Nullable public String getId(); + method @Nullable public Long getLong(String); + method public com.google.cloud.firestore.DocumentReference getReference(); + method @Nullable public String getString(String); + method @Nullable public Timestamp getTimestamp(String); + method @Nullable public Timestamp getUpdateTime(); + method public int hashCode(); + method @Nullable public T toObject(Class); + method public String toString(); + } + + public final class PipelineSnapshot { + method public Timestamp getExecutionTime(); + method @Nullable public com.google.cloud.firestore.ExplainStats getExplainStats(); + method public com.google.cloud.firestore.Pipeline getPipeline(); + method public List getResults(); + } + + public final class PipelineSource { + method public com.google.cloud.firestore.Pipeline collection(com.google.cloud.firestore.CollectionReference); + method public com.google.cloud.firestore.Pipeline collection(String); + method public com.google.cloud.firestore.Pipeline collection(String, com.google.cloud.firestore.pipeline.stages.CollectionOptions); + method public com.google.cloud.firestore.Pipeline collectionGroup(String); + method public com.google.cloud.firestore.Pipeline collectionGroup(String, com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions); + method public com.google.cloud.firestore.Pipeline createFrom(com.google.cloud.firestore.AggregateQuery); + method public com.google.cloud.firestore.Pipeline createFrom(com.google.cloud.firestore.Query); + method public com.google.cloud.firestore.Pipeline database(); + method public com.google.cloud.firestore.Pipeline documents(com.google.cloud.firestore.DocumentReference...); + } + + public class PipelineUtils { + ctor public PipelineUtils(); + method public static Value encodeValue(boolean); + method public static Value encodeValue(com.google.cloud.firestore.pipeline.expressions.AggregateFunction); + method public static Value encodeValue(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static Value encodeValue(double); + method public static Value encodeValue(long); + method public static Value encodeValue(Map); + method public static Value encodeValue(Object); + method public static Value encodeValue(String); + method public static Map fieldNamesToMap(String...); + method public static Map selectablesToMap(com.google.cloud.firestore.pipeline.expressions.Selectable...); + } + public final class PlanSummary { - method @NonNull public List> getIndexesUsed(); + method public List> getIndexesUsed(); } public final class Precondition { method public boolean equals(Object); method public int hashCode(); - method @NonNull public static com.google.cloud.firestore.Precondition updatedAt(Timestamp); + method public static com.google.cloud.firestore.Precondition updatedAt(Timestamp); field public static final com.google.cloud.firestore.Precondition NONE; } public class Query { ctor protected Query(com.google.cloud.firestore.FirestoreRpcContext, com.google.cloud.firestore.Query.QueryOptions); - method @NonNull public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(@NonNull com.google.cloud.firestore.EventListener); - method @NonNull public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(@NonNull Executor, @NonNull com.google.cloud.firestore.EventListener); - method @NonNull public com.google.cloud.firestore.AggregateQuery aggregate(@NonNull com.google.cloud.firestore.AggregateField, @NonNull com.google.cloud.firestore.AggregateField...); - method @NonNull public com.google.cloud.firestore.AggregateQuery count(); - method @NonNull public com.google.cloud.firestore.Query endAt(@NonNull com.google.cloud.firestore.DocumentSnapshot); - method @NonNull public com.google.cloud.firestore.Query endAt(Object...); - method @NonNull public com.google.cloud.firestore.Query endBefore(@NonNull com.google.cloud.firestore.DocumentSnapshot); - method @NonNull public com.google.cloud.firestore.Query endBefore(Object...); + method public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(com.google.cloud.firestore.EventListener); + method public com.google.cloud.firestore.ListenerRegistration addSnapshotListener(Executor, com.google.cloud.firestore.EventListener); + method public com.google.cloud.firestore.AggregateQuery aggregate(com.google.cloud.firestore.AggregateField, com.google.cloud.firestore.AggregateField...); + method public com.google.cloud.firestore.AggregateQuery count(); + method public com.google.cloud.firestore.Query endAt(com.google.cloud.firestore.DocumentSnapshot); + method public com.google.cloud.firestore.Query endAt(Object...); + method public com.google.cloud.firestore.Query endBefore(com.google.cloud.firestore.DocumentSnapshot); + method public com.google.cloud.firestore.Query endBefore(Object...); method public boolean equals(Object); - method @NonNull public ApiFuture> explain(com.google.cloud.firestore.ExplainOptions); - method @NonNull public ApiFuture explainStream(@NonNull com.google.cloud.firestore.ExplainOptions, @NonNull ApiStreamObserver); + method public ApiFuture> explain(com.google.cloud.firestore.ExplainOptions); + method public ApiFuture explainStream(com.google.cloud.firestore.ExplainOptions, ApiStreamObserver); method public static com.google.cloud.firestore.Query fromProto(com.google.cloud.firestore.Firestore, RunQueryRequest); - method @NonNull public ApiFuture get(); - method @NonNull public com.google.cloud.firestore.Firestore getFirestore(); + method public ApiFuture get(); + method public com.google.cloud.firestore.Firestore getFirestore(); method public int hashCode(); - method @NonNull public com.google.cloud.firestore.Query limit(int); - method @NonNull public com.google.cloud.firestore.Query limitToLast(int); - method @NonNull public com.google.cloud.firestore.Query offset(int); - method @NonNull public com.google.cloud.firestore.Query orderBy(@NonNull com.google.cloud.firestore.FieldPath); - method @NonNull public com.google.cloud.firestore.Query orderBy(@NonNull com.google.cloud.firestore.FieldPath, @NonNull com.google.cloud.firestore.Query.Direction); - method @NonNull public com.google.cloud.firestore.Query orderBy(@NonNull String); - method @NonNull public com.google.cloud.firestore.Query orderBy(@NonNull String, @NonNull com.google.cloud.firestore.Query.Direction); - method @NonNull public com.google.cloud.firestore.Query select(com.google.cloud.firestore.FieldPath...); - method @NonNull public com.google.cloud.firestore.Query select(String...); - method @NonNull public com.google.cloud.firestore.Query startAfter(@NonNull com.google.cloud.firestore.DocumentSnapshot); + method public com.google.cloud.firestore.Query limit(int); + method public com.google.cloud.firestore.Query limitToLast(int); + method public com.google.cloud.firestore.Query offset(int); + method public com.google.cloud.firestore.Query orderBy(com.google.cloud.firestore.FieldPath); + method public com.google.cloud.firestore.Query orderBy(com.google.cloud.firestore.FieldPath, com.google.cloud.firestore.Query.Direction); + method public com.google.cloud.firestore.Query orderBy(String); + method public com.google.cloud.firestore.Query orderBy(String, com.google.cloud.firestore.Query.Direction); + method public com.google.cloud.firestore.Query select(com.google.cloud.firestore.FieldPath...); + method public com.google.cloud.firestore.Query select(String...); + method public com.google.cloud.firestore.Query startAfter(com.google.cloud.firestore.DocumentSnapshot); method public com.google.cloud.firestore.Query startAfter(Object...); - method @NonNull public com.google.cloud.firestore.Query startAt(@NonNull com.google.cloud.firestore.DocumentSnapshot); - method @NonNull public com.google.cloud.firestore.Query startAt(Object...); - method public void stream(@NonNull ApiStreamObserver); + method public com.google.cloud.firestore.Query startAt(com.google.cloud.firestore.DocumentSnapshot); + method public com.google.cloud.firestore.Query startAt(Object...); + method public void stream(ApiStreamObserver); method public RunQueryRequest toProto(); method public com.google.cloud.firestore.Query where(com.google.cloud.firestore.Filter); - method @NonNull public com.google.cloud.firestore.Query whereArrayContains(@NonNull com.google.cloud.firestore.FieldPath, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereArrayContains(@NonNull String, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereArrayContainsAny(@NonNull com.google.cloud.firestore.FieldPath, @NonNull List); - method @NonNull public com.google.cloud.firestore.Query whereArrayContainsAny(@NonNull String, @NonNull List); - method @NonNull public com.google.cloud.firestore.Query whereEqualTo(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public com.google.cloud.firestore.Query whereEqualTo(@NonNull String, @Nullable Object); - method @NonNull public com.google.cloud.firestore.Query whereGreaterThan(@NonNull com.google.cloud.firestore.FieldPath, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereGreaterThan(@NonNull String, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereGreaterThanOrEqualTo(@NonNull com.google.cloud.firestore.FieldPath, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereGreaterThanOrEqualTo(@NonNull String, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereIn(@NonNull com.google.cloud.firestore.FieldPath, @NonNull List); - method @NonNull public com.google.cloud.firestore.Query whereIn(@NonNull String, @NonNull List); - method @NonNull public com.google.cloud.firestore.Query whereLessThan(@NonNull com.google.cloud.firestore.FieldPath, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereLessThan(@NonNull String, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereLessThanOrEqualTo(@NonNull com.google.cloud.firestore.FieldPath, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereLessThanOrEqualTo(@NonNull String, @NonNull Object); - method @NonNull public com.google.cloud.firestore.Query whereNotEqualTo(@NonNull com.google.cloud.firestore.FieldPath, @Nullable Object); - method @NonNull public com.google.cloud.firestore.Query whereNotEqualTo(@NonNull String, @Nullable Object); - method @NonNull public com.google.cloud.firestore.Query whereNotIn(@NonNull com.google.cloud.firestore.FieldPath, @NonNull List); - method @NonNull public com.google.cloud.firestore.Query whereNotIn(@NonNull String, @NonNull List); + method public com.google.cloud.firestore.Query whereArrayContains(com.google.cloud.firestore.FieldPath, Object); + method public com.google.cloud.firestore.Query whereArrayContains(String, Object); + method public com.google.cloud.firestore.Query whereArrayContainsAny(com.google.cloud.firestore.FieldPath, List); + method public com.google.cloud.firestore.Query whereArrayContainsAny(String, List); + method public com.google.cloud.firestore.Query whereEqualTo(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public com.google.cloud.firestore.Query whereEqualTo(String, @Nullable Object); + method public com.google.cloud.firestore.Query whereGreaterThan(com.google.cloud.firestore.FieldPath, Object); + method public com.google.cloud.firestore.Query whereGreaterThan(String, Object); + method public com.google.cloud.firestore.Query whereGreaterThanOrEqualTo(com.google.cloud.firestore.FieldPath, Object); + method public com.google.cloud.firestore.Query whereGreaterThanOrEqualTo(String, Object); + method public com.google.cloud.firestore.Query whereIn(com.google.cloud.firestore.FieldPath, List); + method public com.google.cloud.firestore.Query whereIn(String, List); + method public com.google.cloud.firestore.Query whereLessThan(com.google.cloud.firestore.FieldPath, Object); + method public com.google.cloud.firestore.Query whereLessThan(String, Object); + method public com.google.cloud.firestore.Query whereLessThanOrEqualTo(com.google.cloud.firestore.FieldPath, Object); + method public com.google.cloud.firestore.Query whereLessThanOrEqualTo(String, Object); + method public com.google.cloud.firestore.Query whereNotEqualTo(com.google.cloud.firestore.FieldPath, @Nullable Object); + method public com.google.cloud.firestore.Query whereNotEqualTo(String, @Nullable Object); + method public com.google.cloud.firestore.Query whereNotIn(com.google.cloud.firestore.FieldPath, List); + method public com.google.cloud.firestore.Query whereNotIn(String, List); } public enum Query.Direction { @@ -506,15 +622,15 @@ package com.google.cloud.firestore { public abstract class QuerySnapshot { ctor protected QuerySnapshot(com.google.cloud.firestore.Query, Timestamp); method public abstract boolean equals(Object); - method @NonNull public abstract List getDocumentChanges(); - method @NonNull public abstract List getDocuments(); - method @NonNull public com.google.cloud.firestore.Query getQuery(); - method @NonNull public Timestamp getReadTime(); + method public abstract List getDocumentChanges(); + method public abstract List getDocuments(); + method public com.google.cloud.firestore.Query getQuery(); + method public Timestamp getReadTime(); method public abstract int hashCode(); method public boolean isEmpty(); - method @NonNull public Iterator iterator(); + method public Iterator iterator(); method public abstract int size(); - method @NonNull public List toObjects(@NonNull Class); + method public List toObjects(Class); method public static com.google.cloud.firestore.QuerySnapshot withChanges(com.google.cloud.firestore.Query, Timestamp, com.google.cloud.firestore.DocumentSet, List); method public static com.google.cloud.firestore.QuerySnapshot withDocuments(com.google.cloud.firestore.Query, Timestamp, List); } @@ -523,26 +639,29 @@ package com.google.cloud.firestore { method public ApiFuture run(); field public static final int MAX_PENDING_OPS = 5000; // 0x1388 field public static final int MIN_PENDING_OPS = 1000; // 0x3e8 - field public static final String REFERENCE_NAME_MIN_ID; + field public static final String REFERENCE_NAME_MIN_ID = "__id-9223372036854775808__"; } public final class SetOptions { method public boolean equals(Object); method public int hashCode(); - method @NonNull public static com.google.cloud.firestore.SetOptions merge(); - method @NonNull public static com.google.cloud.firestore.SetOptions mergeFieldPaths(List); - method @NonNull public static com.google.cloud.firestore.SetOptions mergeFields(List); - method @NonNull public static com.google.cloud.firestore.SetOptions mergeFields(String...); + method public static com.google.cloud.firestore.SetOptions merge(); + method public static com.google.cloud.firestore.SetOptions mergeFieldPaths(List); + method public static com.google.cloud.firestore.SetOptions mergeFields(List); + method public static com.google.cloud.firestore.SetOptions mergeFields(String...); } public abstract class Transaction extends com.google.cloud.firestore.UpdateBuilder { ctor protected Transaction(com.google.cloud.firestore.FirestoreImpl); - method @NonNull public abstract ApiFuture get(@NonNull com.google.cloud.firestore.AggregateQuery); - method @NonNull public abstract ApiFuture get(@NonNull com.google.cloud.firestore.DocumentReference); - method @NonNull public abstract ApiFuture get(@NonNull com.google.cloud.firestore.Query); - method @NonNull public abstract ApiFuture> getAll(@NonNull com.google.cloud.firestore.DocumentReference...); - method @NonNull public abstract ApiFuture> getAll(@NonNull com.google.cloud.firestore.DocumentReference[], @Nullable com.google.cloud.firestore.FieldMask); + method public abstract ApiFuture execute(com.google.cloud.firestore.Pipeline); + method public abstract ApiFuture execute(com.google.cloud.firestore.Pipeline, com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions); + method public abstract ApiFuture get(com.google.cloud.firestore.AggregateQuery); + method public abstract ApiFuture get(com.google.cloud.firestore.DocumentReference); + method public abstract ApiFuture get(com.google.cloud.firestore.Query); + method public abstract ApiFuture> getAll(com.google.cloud.firestore.DocumentReference...); + method public abstract ApiFuture> getAll(com.google.cloud.firestore.DocumentReference[], @Nullable com.google.cloud.firestore.FieldMask); method public abstract boolean hasTransactionId(); + field protected com.google.cloud.firestore.telemetry.TraceUtil.Context transactionTraceContext; } public static interface Transaction.AsyncFunction { @@ -554,36 +673,36 @@ package com.google.cloud.firestore { } public final class TransactionOptions { - method @NonNull public static com.google.cloud.firestore.TransactionOptions create(); - method @Deprecated @NonNull public static com.google.cloud.firestore.TransactionOptions create(@Nullable Executor); - method @Deprecated @NonNull public static com.google.cloud.firestore.TransactionOptions create(@Nullable Executor, int); - method @Deprecated @NonNull public static com.google.cloud.firestore.TransactionOptions create(int); - method @NonNull public static com.google.cloud.firestore.TransactionOptions.ReadOnlyOptionsBuilder createReadOnlyOptionsBuilder(); - method @NonNull public static com.google.cloud.firestore.TransactionOptions.ReadWriteOptionsBuilder createReadWriteOptionsBuilder(); + method public static com.google.cloud.firestore.TransactionOptions create(); + method @Deprecated public static com.google.cloud.firestore.TransactionOptions create(@Nullable Executor); + method @Deprecated public static com.google.cloud.firestore.TransactionOptions create(@Nullable Executor, int); + method @Deprecated public static com.google.cloud.firestore.TransactionOptions create(int); + method public static com.google.cloud.firestore.TransactionOptions.ReadOnlyOptionsBuilder createReadOnlyOptionsBuilder(); + method public static com.google.cloud.firestore.TransactionOptions.ReadWriteOptionsBuilder createReadWriteOptionsBuilder(); method @Nullable public Executor getExecutor(); method public int getNumberOfAttempts(); method @Nullable public Timestamp getReadTime(); - method @NonNull public com.google.cloud.firestore.TransactionOptions.TransactionOptionsType getType(); + method public com.google.cloud.firestore.TransactionOptions.TransactionOptionsType getType(); } public abstract static class TransactionOptions.Builder> { ctor protected TransactionOptions.Builder(@Nullable Executor); - method @NonNull public abstract com.google.cloud.firestore.TransactionOptions build(); + method public abstract com.google.cloud.firestore.TransactionOptions build(); method @Nullable public Executor getExecutor(); - method @NonNull public B setExecutor(@Nullable Executor); + method public B setExecutor(@Nullable Executor); field @Nullable protected Executor executor; } public static final class TransactionOptions.ReadOnlyOptionsBuilder extends com.google.cloud.firestore.TransactionOptions.Builder { - method @NonNull public com.google.cloud.firestore.TransactionOptions build(); + method public com.google.cloud.firestore.TransactionOptions build(); method @Nullable public TimestampOrBuilder getReadTime(); - method @NonNull public com.google.cloud.firestore.TransactionOptions.ReadOnlyOptionsBuilder setReadTime(@Nullable TimestampOrBuilder); + method public com.google.cloud.firestore.TransactionOptions.ReadOnlyOptionsBuilder setReadTime(@Nullable TimestampOrBuilder); } public static final class TransactionOptions.ReadWriteOptionsBuilder extends com.google.cloud.firestore.TransactionOptions.Builder { - method @NonNull public com.google.cloud.firestore.TransactionOptions build(); + method public com.google.cloud.firestore.TransactionOptions build(); method public int getNumberOfAttempts(); - method @NonNull public com.google.cloud.firestore.TransactionOptions.ReadWriteOptionsBuilder setNumberOfAttempts(int); + method public com.google.cloud.firestore.TransactionOptions.ReadWriteOptionsBuilder setNumberOfAttempts(int); } public enum TransactionOptions.TransactionOptionsType { @@ -593,32 +712,38 @@ package com.google.cloud.firestore { public abstract class UpdateBuilder { method protected String className(); - method @NonNull public T create(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map); - method @NonNull public T create(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Object); - method @NonNull public T delete(@NonNull com.google.cloud.firestore.DocumentReference); - method @NonNull public T delete(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.Precondition); + method public T create(com.google.cloud.firestore.DocumentReference, Map); + method public T create(com.google.cloud.firestore.DocumentReference, Object); + method public T delete(com.google.cloud.firestore.DocumentReference); + method public T delete(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.Precondition); method public int getMutationsSize(); - method @NonNull public T set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map); - method @NonNull public T set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map, @NonNull com.google.cloud.firestore.SetOptions); - method @NonNull public T set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Object); - method @NonNull public T set(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Object, @NonNull com.google.cloud.firestore.SetOptions); + method public T set(com.google.cloud.firestore.DocumentReference, Map); + method public T set(com.google.cloud.firestore.DocumentReference, Map, com.google.cloud.firestore.SetOptions); + method public T set(com.google.cloud.firestore.DocumentReference, Object); + method public T set(com.google.cloud.firestore.DocumentReference, Object, com.google.cloud.firestore.SetOptions); method public String toString(); - method @NonNull public T update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); - method @NonNull public T update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.Precondition, @NonNull com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); - method @NonNull public T update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull com.google.cloud.firestore.Precondition, @NonNull String, @Nullable Object, Object...); - method @NonNull public T update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map); - method @NonNull public T update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull Map, com.google.cloud.firestore.Precondition); - method @NonNull public T update(@NonNull com.google.cloud.firestore.DocumentReference, @NonNull String, @Nullable Object, Object...); + method public T update(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); + method public T update(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.Precondition, com.google.cloud.firestore.FieldPath, @Nullable Object, Object...); + method public T update(com.google.cloud.firestore.DocumentReference, com.google.cloud.firestore.Precondition, String, @Nullable Object, Object...); + method public T update(com.google.cloud.firestore.DocumentReference, Map); + method public T update(com.google.cloud.firestore.DocumentReference, Map, com.google.cloud.firestore.Precondition); + method public T update(com.google.cloud.firestore.DocumentReference, String, @Nullable Object, Object...); field protected volatile boolean committed; } + public final class VectorValue { + method public boolean equals(Object); + method public int hashCode(); + method public double[] toArray(); + } + public class WriteBatch extends com.google.cloud.firestore.UpdateBuilder { - method @NonNull public ApiFuture> commit(); + method public ApiFuture> commit(); } public final class WriteResult { method public boolean equals(Object); - method @NonNull public Timestamp getUpdateTime(); + method public Timestamp getUpdateTime(); method public int hashCode(); } @@ -841,6 +966,696 @@ package com.google.cloud.firestore.collection { } +package com.google.cloud.firestore.pipeline.expressions { + + public class AggregateFunction { + method public com.google.cloud.firestore.pipeline.expressions.AliasedAggregate as(String); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction avg(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction avg(String); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction count(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction count(String); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction countAll(); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction countDistinct(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction countDistinct(String); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction countIf(com.google.cloud.firestore.pipeline.expressions.BooleanExpr); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction generic(String, com.google.cloud.firestore.pipeline.expressions.Expr...); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction maximum(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction maximum(String); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction minimum(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction minimum(String); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction sum(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.AggregateFunction sum(String); + } + + public class AliasedAggregate { + method public String getAlias(); + method public com.google.cloud.firestore.pipeline.expressions.AggregateFunction getExpr(); + } + + public final class AliasedExpr extends com.google.cloud.firestore.pipeline.expressions.Expr implements com.google.cloud.firestore.pipeline.expressions.Selectable { + method public String getAlias(); + method public T getExpr(); + } + + public class BooleanExpr extends com.google.cloud.firestore.pipeline.expressions.FunctionExpr { + } + + public final class Constant extends com.google.cloud.firestore.pipeline.expressions.Expr { + method public static com.google.cloud.firestore.pipeline.expressions.Constant nullValue(); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Boolean); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(byte[]); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(com.google.cloud.firestore.Blob); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(com.google.cloud.firestore.DocumentReference); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(com.google.cloud.firestore.GeoPoint); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Date); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Iterable); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Map); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Number); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Object[]); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(String); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Timestamp); + method public static com.google.cloud.firestore.pipeline.expressions.Constant of(Value); + method public static com.google.cloud.firestore.pipeline.expressions.Constant vector(double[]); + } + + public abstract class Expr { + method public final com.google.cloud.firestore.pipeline.expressions.Expr abs(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr abs(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr abs(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr add(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr add(com.google.cloud.firestore.pipeline.expressions.Expr, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr add(Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr add(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr add(String, Number); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr and(com.google.cloud.firestore.pipeline.expressions.BooleanExpr, com.google.cloud.firestore.pipeline.expressions.BooleanExpr...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr array(List); + method public static com.google.cloud.firestore.pipeline.expressions.Expr array(Object...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayConcat(com.google.cloud.firestore.pipeline.expressions.Expr, Object...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr arrayConcat(com.google.cloud.firestore.pipeline.expressions.Expr...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayConcat(String, Object...); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContains(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContains(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContains(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContains(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContains(String, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAll(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAll(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAll(com.google.cloud.firestore.pipeline.expressions.Expr, List); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAll(List); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAll(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAll(String, List); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAny(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAny(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAny(com.google.cloud.firestore.pipeline.expressions.Expr, List); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAny(List); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAny(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr arrayContainsAny(String, List); + method public final com.google.cloud.firestore.pipeline.expressions.Expr arrayGet(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayGet(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayGet(com.google.cloud.firestore.pipeline.expressions.Expr, int); + method public final com.google.cloud.firestore.pipeline.expressions.Expr arrayGet(int); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayGet(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayGet(String, int); + method public final com.google.cloud.firestore.pipeline.expressions.Expr arrayLength(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayLength(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayLength(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr arrayReverse(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayReverse(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr arrayReverse(String); + method public com.google.cloud.firestore.pipeline.expressions.Selectable as(String); + method public final com.google.cloud.firestore.pipeline.expressions.Ordering ascending(); + method public final com.google.cloud.firestore.pipeline.expressions.AggregateFunction avg(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr blob(byte[]); + method public final com.google.cloud.firestore.pipeline.expressions.Expr byteLength(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr byteLength(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr byteLength(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr ceil(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr ceil(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr ceil(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr charLength(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr charLength(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr charLength(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr collectionId(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr collectionId(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr collectionId(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr cond(com.google.cloud.firestore.pipeline.expressions.BooleanExpr, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr cond(com.google.cloud.firestore.pipeline.expressions.BooleanExpr, Object, Object); + method public final com.google.cloud.firestore.pipeline.expressions.Expr cond(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public final com.google.cloud.firestore.pipeline.expressions.Expr cond(Object, Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr constant(Boolean); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(byte[]); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(com.google.cloud.firestore.Blob); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(com.google.cloud.firestore.DocumentReference); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(com.google.cloud.firestore.GeoPoint); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(com.google.cloud.firestore.VectorValue); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(Date); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(Number); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr constant(Timestamp); + method public final com.google.cloud.firestore.pipeline.expressions.Expr cosineDistance(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr cosineDistance(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr cosineDistance(com.google.cloud.firestore.pipeline.expressions.Expr, double[]); + method public final com.google.cloud.firestore.pipeline.expressions.Expr cosineDistance(double[]); + method public static com.google.cloud.firestore.pipeline.expressions.Expr cosineDistance(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr cosineDistance(String, double[]); + method public final com.google.cloud.firestore.pipeline.expressions.AggregateFunction count(); + method public final com.google.cloud.firestore.pipeline.expressions.AggregateFunction countDistinct(); + method public final com.google.cloud.firestore.pipeline.expressions.Ordering descending(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr divide(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr divide(com.google.cloud.firestore.pipeline.expressions.Expr, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr divide(Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr divide(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr divide(String, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr documentId(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr documentId(com.google.cloud.firestore.DocumentReference); + method public static com.google.cloud.firestore.pipeline.expressions.Expr documentId(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr documentId(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr dotProduct(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr dotProduct(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr dotProduct(com.google.cloud.firestore.pipeline.expressions.Expr, double[]); + method public final com.google.cloud.firestore.pipeline.expressions.Expr dotProduct(double[]); + method public static com.google.cloud.firestore.pipeline.expressions.Expr dotProduct(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr dotProduct(String, double[]); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr endsWith(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr endsWith(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr endsWith(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr endsWith(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr endsWith(String, String); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eq(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eq(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr eq(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eq(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eq(String, Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eqAny(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eqAny(com.google.cloud.firestore.pipeline.expressions.Expr, List); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr eqAny(List); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eqAny(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr eqAny(String, List); + method public final com.google.cloud.firestore.pipeline.expressions.Expr euclideanDistance(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr euclideanDistance(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr euclideanDistance(com.google.cloud.firestore.pipeline.expressions.Expr, double[]); + method public final com.google.cloud.firestore.pipeline.expressions.Expr euclideanDistance(double[]); + method public static com.google.cloud.firestore.pipeline.expressions.Expr euclideanDistance(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr euclideanDistance(String, double[]); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr exists(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr exists(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr exists(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr exp(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr exp(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr exp(String); + method public static com.google.cloud.firestore.pipeline.expressions.Field field(com.google.cloud.firestore.FieldPath); + method public static com.google.cloud.firestore.pipeline.expressions.Field field(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr floor(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr floor(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr floor(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr generic(String, com.google.cloud.firestore.pipeline.expressions.Expr...); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gt(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gt(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr gt(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gt(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gt(String, Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gte(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gte(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr gte(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gte(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr gte(String, Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr ifError(com.google.cloud.firestore.pipeline.expressions.BooleanExpr, com.google.cloud.firestore.pipeline.expressions.BooleanExpr); + method public final com.google.cloud.firestore.pipeline.expressions.Expr ifError(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr ifError(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr ifError(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.Expr ifError(Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr isAbsent(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isAbsent(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isAbsent(String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr isError(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isError(com.google.cloud.firestore.pipeline.expressions.Expr); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNaN(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNaN(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNaN(String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNotNan(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNotNan(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNotNan(String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNotNull(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNotNull(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNotNull(String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNull(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNull(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr isNull(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr length(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr length(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr length(String); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr like(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr like(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr like(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr like(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr like(String, String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr ln(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr ln(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr ln(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr log(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr log(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr log(com.google.cloud.firestore.pipeline.expressions.Expr, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr log(Number); + method public static com.google.cloud.firestore.pipeline.expressions.Expr log(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr log(String, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr log10(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr log10(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr log10(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr logicalMaximum(com.google.cloud.firestore.pipeline.expressions.Expr, Object...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr logicalMaximum(Object...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr logicalMaximum(String, Object...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr logicalMinimum(com.google.cloud.firestore.pipeline.expressions.Expr, Object...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr logicalMinimum(Object...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr logicalMinimum(String, Object...); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lt(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lt(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr lt(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lt(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lt(String, Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lte(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lte(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr lte(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lte(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr lte(String, Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr map(Map); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapGet(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapGet(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr mapGet(Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapGet(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapGet(String, String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapMerge(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapMerge(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr mapMerge(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapMerge(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapMerge(String, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr mapRemove(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapRemove(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapRemove(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr mapRemove(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapRemove(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mapRemove(String, String); + method public final com.google.cloud.firestore.pipeline.expressions.AggregateFunction maximum(); + method public final com.google.cloud.firestore.pipeline.expressions.AggregateFunction minimum(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mod(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mod(com.google.cloud.firestore.pipeline.expressions.Expr, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr mod(Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mod(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr mod(String, Number); + method public static com.google.cloud.firestore.pipeline.expressions.Expr multiply(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr multiply(com.google.cloud.firestore.pipeline.expressions.Expr, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr multiply(Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr multiply(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr multiply(String, Number); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr neq(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr neq(com.google.cloud.firestore.pipeline.expressions.Expr, Object); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr neq(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr neq(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr neq(String, Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr not(com.google.cloud.firestore.pipeline.expressions.BooleanExpr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr notEqAny(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr notEqAny(com.google.cloud.firestore.pipeline.expressions.Expr, List); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr notEqAny(List); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr notEqAny(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr notEqAny(String, List); + method public static com.google.cloud.firestore.pipeline.expressions.Expr nullValue(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr or(com.google.cloud.firestore.pipeline.expressions.BooleanExpr, com.google.cloud.firestore.pipeline.expressions.BooleanExpr...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr pow(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr pow(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr pow(com.google.cloud.firestore.pipeline.expressions.Expr, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr pow(Number); + method public static com.google.cloud.firestore.pipeline.expressions.Expr pow(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr pow(String, Number); + method public static com.google.cloud.firestore.pipeline.expressions.Expr rand(); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexContains(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexContains(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexContains(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexContains(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexContains(String, String); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexMatch(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexMatch(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexMatch(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexMatch(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr regexMatch(String, String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr round(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr round(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr round(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr roundToPrecision(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr roundToPrecision(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr roundToPrecision(com.google.cloud.firestore.pipeline.expressions.Expr, int); + method public final com.google.cloud.firestore.pipeline.expressions.Expr roundToPrecision(int); + method public static com.google.cloud.firestore.pipeline.expressions.Expr roundToPrecision(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr roundToPrecision(String, int); + method public final com.google.cloud.firestore.pipeline.expressions.Expr sqrt(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr sqrt(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr sqrt(String); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr startsWith(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr startsWith(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr startsWith(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr startsWith(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr startsWith(String, String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr strConcat(com.google.cloud.firestore.pipeline.expressions.Expr, Object...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr strConcat(com.google.cloud.firestore.pipeline.expressions.Expr...); + method public static com.google.cloud.firestore.pipeline.expressions.Expr strConcat(String, Object...); + method public final com.google.cloud.firestore.pipeline.expressions.Expr strConcat(String...); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr strContains(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr strContains(com.google.cloud.firestore.pipeline.expressions.Expr, String); + method public final com.google.cloud.firestore.pipeline.expressions.BooleanExpr strContains(Object); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr strContains(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr strContains(String, String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr strReverse(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr strReverse(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr strReverse(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr substring(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public final com.google.cloud.firestore.pipeline.expressions.Expr substring(Object, Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr substring(String, int, int); + method public static com.google.cloud.firestore.pipeline.expressions.Expr subtract(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr subtract(com.google.cloud.firestore.pipeline.expressions.Expr, Number); + method public final com.google.cloud.firestore.pipeline.expressions.Expr subtract(Object); + method public static com.google.cloud.firestore.pipeline.expressions.Expr subtract(String, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr subtract(String, Number); + method public final com.google.cloud.firestore.pipeline.expressions.AggregateFunction sum(); + method public final com.google.cloud.firestore.pipeline.expressions.Expr timestampAdd(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampAdd(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampAdd(com.google.cloud.firestore.pipeline.expressions.Expr, String, long); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampAdd(String, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public final com.google.cloud.firestore.pipeline.expressions.Expr timestampAdd(String, long); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampAdd(String, String, long); + method public final com.google.cloud.firestore.pipeline.expressions.Expr timestampSub(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampSub(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampSub(com.google.cloud.firestore.pipeline.expressions.Expr, String, long); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampSub(String, com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.expressions.Expr); + method public final com.google.cloud.firestore.pipeline.expressions.Expr timestampSub(String, long); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampSub(String, String, long); + method public final com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixMicros(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixMicros(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixMicros(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixMillis(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixMillis(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixMillis(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixSeconds(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixSeconds(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr timestampToUnixSeconds(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr toLower(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr toLower(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr toLower(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr toUpper(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr toUpper(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr toUpper(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr trim(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr trim(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr trim(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr unixMicrosToTimestamp(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr unixMicrosToTimestamp(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr unixMicrosToTimestamp(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr unixMillisToTimestamp(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr unixMillisToTimestamp(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr unixMillisToTimestamp(String); + method public final com.google.cloud.firestore.pipeline.expressions.Expr unixSecondsToTimestamp(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr unixSecondsToTimestamp(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr unixSecondsToTimestamp(String); + method public static com.google.cloud.firestore.pipeline.expressions.Expr vector(com.google.cloud.firestore.VectorValue); + method public static com.google.cloud.firestore.pipeline.expressions.Expr vector(double[]); + method public final com.google.cloud.firestore.pipeline.expressions.Expr vectorLength(); + method public static com.google.cloud.firestore.pipeline.expressions.Expr vectorLength(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Expr vectorLength(String); + method public static com.google.cloud.firestore.pipeline.expressions.BooleanExpr xor(com.google.cloud.firestore.pipeline.expressions.BooleanExpr, com.google.cloud.firestore.pipeline.expressions.BooleanExpr...); + } + + public final class Field extends com.google.cloud.firestore.pipeline.expressions.Expr implements com.google.cloud.firestore.pipeline.expressions.Selectable { + method public boolean equals(Object); + method public com.google.cloud.firestore.FieldPath getPath(); + method public int hashCode(); + method public static com.google.cloud.firestore.pipeline.expressions.Field ofServerPath(String); + method public static com.google.cloud.firestore.pipeline.expressions.Field ofUserPath(String); + method public Value toProto(); + field public static final String DOCUMENT_ID = "__name__"; + } + + public class FunctionExpr extends com.google.cloud.firestore.pipeline.expressions.Expr { + method public boolean equals(Object); + method public int hashCode(); + } + + public final class FunctionUtils { + ctor public FunctionUtils(); + method public static Value aggregateFunctionToValue(com.google.cloud.firestore.pipeline.expressions.AggregateFunction); + method public static Value exprToValue(com.google.cloud.firestore.pipeline.expressions.Expr); + } + + public final class Ordering { + method public static com.google.cloud.firestore.pipeline.expressions.Ordering ascending(com.google.cloud.firestore.pipeline.expressions.Expr); + method public static com.google.cloud.firestore.pipeline.expressions.Ordering descending(com.google.cloud.firestore.pipeline.expressions.Expr); + method public com.google.cloud.firestore.pipeline.expressions.Ordering.Direction getDir(); + method public com.google.cloud.firestore.pipeline.expressions.Expr getExpr(); + method public Value toProto(); + } + + public enum Ordering.Direction { + method public String toString(); + enum_constant public static final com.google.cloud.firestore.pipeline.expressions.Ordering.Direction ASCENDING; + enum_constant public static final com.google.cloud.firestore.pipeline.expressions.Ordering.Direction DESCENDING; + } + + public interface Selectable { + } + +} + +package com.google.cloud.firestore.pipeline.stages { + + public final class AddFields extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public AddFields(Map); + } + + public final class Aggregate extends com.google.cloud.firestore.pipeline.stages.Stage { + method public static com.google.cloud.firestore.pipeline.stages.Aggregate withAccumulators(com.google.cloud.firestore.pipeline.expressions.AliasedAggregate...); + method public com.google.cloud.firestore.pipeline.stages.Aggregate withGroups(com.google.cloud.firestore.pipeline.expressions.Selectable...); + method public com.google.cloud.firestore.pipeline.stages.Aggregate withGroups(String...); + method public com.google.cloud.firestore.pipeline.stages.Aggregate withOptions(com.google.cloud.firestore.pipeline.stages.AggregateOptions); + } + + public final class AggregateHints { + ctor public AggregateHints(); + method public final com.google.cloud.firestore.pipeline.stages.AggregateHints with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.AggregateHints with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.AggregateHints with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.AggregateHints with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.AggregateHints with(String, String); + method public com.google.cloud.firestore.pipeline.stages.AggregateHints withForceStreamableEnabled(); + method public final com.google.cloud.firestore.pipeline.stages.AggregateHints withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class AggregateOptions { + ctor public AggregateOptions(); + method public final com.google.cloud.firestore.pipeline.stages.AggregateOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.AggregateOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.AggregateOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.AggregateOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.AggregateOptions with(String, String); + method public com.google.cloud.firestore.pipeline.stages.AggregateOptions withHints(com.google.cloud.firestore.pipeline.stages.AggregateHints); + method public final com.google.cloud.firestore.pipeline.stages.AggregateOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class Collection extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Collection(String, com.google.cloud.firestore.pipeline.stages.CollectionOptions); + method public com.google.cloud.firestore.pipeline.stages.Collection withOptions(com.google.cloud.firestore.pipeline.stages.CollectionOptions); + } + + public final class CollectionGroup extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public CollectionGroup(String, com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions); + method public com.google.cloud.firestore.pipeline.stages.CollectionGroup withOptions(com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions); + } + + public final class CollectionGroupOptions { + ctor public CollectionGroupOptions(); + method public final com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions with(String, String); + method public com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions withHints(com.google.cloud.firestore.pipeline.stages.CollectionHints); + method public final com.google.cloud.firestore.pipeline.stages.CollectionGroupOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class CollectionHints { + ctor public CollectionHints(); + method public final com.google.cloud.firestore.pipeline.stages.CollectionHints with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.CollectionHints with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.CollectionHints with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.CollectionHints with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.CollectionHints with(String, String); + method public com.google.cloud.firestore.pipeline.stages.CollectionHints withForceIndex(String); + method public com.google.cloud.firestore.pipeline.stages.CollectionHints withIgnoreIndexFields(String...); + method public final com.google.cloud.firestore.pipeline.stages.CollectionHints withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class CollectionOptions { + ctor public CollectionOptions(); + method public final com.google.cloud.firestore.pipeline.stages.CollectionOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.CollectionOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.CollectionOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.CollectionOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.CollectionOptions with(String, String); + method public com.google.cloud.firestore.pipeline.stages.CollectionOptions withHints(com.google.cloud.firestore.pipeline.stages.CollectionHints); + method public final com.google.cloud.firestore.pipeline.stages.CollectionOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class Database extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Database(); + } + + public final class Distinct extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Distinct(Map); + } + + public final class Documents extends com.google.cloud.firestore.pipeline.stages.Stage { + method public static com.google.cloud.firestore.pipeline.stages.Documents of(com.google.cloud.firestore.DocumentReference...); + } + + public final class ExplainOptions { + ctor public ExplainOptions(); + method public final com.google.cloud.firestore.pipeline.stages.ExplainOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.ExplainOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.ExplainOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.ExplainOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.ExplainOptions with(String, String); + method public com.google.cloud.firestore.pipeline.stages.ExplainOptions withExecutionMode(com.google.cloud.firestore.pipeline.stages.ExplainOptions.ExecutionMode); + method public final com.google.cloud.firestore.pipeline.stages.ExplainOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public static class ExplainOptions.ExecutionMode { + method public Value toProto(); + field public static final com.google.cloud.firestore.pipeline.stages.ExplainOptions.ExecutionMode ANALYZE; + field public static final com.google.cloud.firestore.pipeline.stages.ExplainOptions.ExecutionMode EXPLAIN; + } + + public final class FindNearest extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public FindNearest(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.VectorValue, com.google.cloud.firestore.pipeline.stages.FindNearest.DistanceMeasure, com.google.cloud.firestore.pipeline.stages.FindNearestOptions); + } + + public static final class FindNearest.DistanceMeasure { + method public static com.google.cloud.firestore.pipeline.stages.FindNearest.DistanceMeasure generic(String); + field public static final com.google.cloud.firestore.pipeline.stages.FindNearest.DistanceMeasure COSINE; + field public static final com.google.cloud.firestore.pipeline.stages.FindNearest.DistanceMeasure DOT_PRODUCT; + field public static final com.google.cloud.firestore.pipeline.stages.FindNearest.DistanceMeasure EUCLIDEAN; + } + + public final class FindNearestOptions { + ctor public FindNearestOptions(); + method public final com.google.cloud.firestore.pipeline.stages.FindNearestOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.FindNearestOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.FindNearestOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.FindNearestOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.FindNearestOptions with(String, String); + method public com.google.cloud.firestore.pipeline.stages.FindNearestOptions withDistanceField(com.google.cloud.firestore.pipeline.expressions.Field); + method public com.google.cloud.firestore.pipeline.stages.FindNearestOptions withDistanceField(String); + method public com.google.cloud.firestore.pipeline.stages.FindNearestOptions withLimit(long); + method public final com.google.cloud.firestore.pipeline.stages.FindNearestOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class GenericOptions { + ctor public GenericOptions(); + method public static com.google.cloud.firestore.pipeline.stages.GenericOptions of(String, boolean); + method public static com.google.cloud.firestore.pipeline.stages.GenericOptions of(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public static com.google.cloud.firestore.pipeline.stages.GenericOptions of(String, double); + method public static com.google.cloud.firestore.pipeline.stages.GenericOptions of(String, long); + method public static com.google.cloud.firestore.pipeline.stages.GenericOptions of(String, String); + method protected com.google.cloud.firestore.pipeline.stages.GenericOptions self(com.google.cloud.firestore.pipeline.stages.InternalOptions); + method public final com.google.cloud.firestore.pipeline.stages.GenericOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.GenericOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.GenericOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.GenericOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.GenericOptions with(String, String); + method public final com.google.cloud.firestore.pipeline.stages.GenericOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class GenericStage extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public GenericStage(String, List, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class Limit extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Limit(int); + } + + public final class Offset extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Offset(int); + } + + public final class PipelineExecuteOptions { + ctor public PipelineExecuteOptions(); + method public final com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions with(String, String); + method public com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions withExplainOptions(com.google.cloud.firestore.pipeline.stages.ExplainOptions); + method public com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions withIndexMode(String); + method public final com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class RemoveFields extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public RemoveFields(ImmutableList); + } + + public class ReplaceWith extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public ReplaceWith(com.google.cloud.firestore.pipeline.expressions.Expr); + ctor public ReplaceWith(com.google.cloud.firestore.pipeline.expressions.Expr, com.google.cloud.firestore.pipeline.stages.ReplaceWith.Mode); + } + + public enum ReplaceWith.Mode { + enum_constant public static final com.google.cloud.firestore.pipeline.stages.ReplaceWith.Mode FULL_REPLACE; + enum_constant public static final com.google.cloud.firestore.pipeline.stages.ReplaceWith.Mode MERGE_PREFER_NEXT; + enum_constant public static final com.google.cloud.firestore.pipeline.stages.ReplaceWith.Mode MERGE_PREFER_PARENT; + field public final Value value; + } + + public final class Sample extends com.google.cloud.firestore.pipeline.stages.Stage { + method public static com.google.cloud.firestore.pipeline.stages.Sample withDocLimit(int); + method public com.google.cloud.firestore.pipeline.stages.Sample withOptions(com.google.cloud.firestore.pipeline.stages.SampleOptions); + method public static com.google.cloud.firestore.pipeline.stages.Sample withPercentage(double); + } + + public enum Sample.Mode { + enum_constant public static final com.google.cloud.firestore.pipeline.stages.Sample.Mode DOCUMENTS; + enum_constant public static final com.google.cloud.firestore.pipeline.stages.Sample.Mode PERCENT; + field public final Value value; + } + + public final class SampleOptions { + ctor public SampleOptions(); + method public final com.google.cloud.firestore.pipeline.stages.SampleOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.SampleOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.SampleOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.SampleOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.SampleOptions with(String, String); + method public final com.google.cloud.firestore.pipeline.stages.SampleOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class Select extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Select(Map); + } + + public final class Sort extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Sort(ImmutableList); + } + + public abstract class Stage { + field protected final String name; + } + + public final class StageUtils { + ctor public StageUtils(); + method public static ImmutableMap toMap(com.google.cloud.firestore.pipeline.stages.AbstractOptions); + method public static com.google.firestore.v1.Pipeline.Stage toStageProto(com.google.cloud.firestore.pipeline.stages.Stage); + } + + public final class Union extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Union(com.google.cloud.firestore.Pipeline); + } + + public final class Unnest extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Unnest(com.google.cloud.firestore.pipeline.expressions.Field, String); + ctor public Unnest(com.google.cloud.firestore.pipeline.expressions.Field, String, com.google.cloud.firestore.pipeline.stages.UnnestOptions); + ctor public Unnest(com.google.cloud.firestore.pipeline.expressions.Selectable); + } + + public final class UnnestOptions { + ctor public UnnestOptions(); + method public final com.google.cloud.firestore.pipeline.stages.UnnestOptions with(String, boolean); + method public final com.google.cloud.firestore.pipeline.stages.UnnestOptions with(String, com.google.cloud.firestore.pipeline.expressions.Field); + method public final com.google.cloud.firestore.pipeline.stages.UnnestOptions with(String, double); + method public final com.google.cloud.firestore.pipeline.stages.UnnestOptions with(String, long); + method public final com.google.cloud.firestore.pipeline.stages.UnnestOptions with(String, String); + method public com.google.cloud.firestore.pipeline.stages.UnnestOptions withIndexField(String); + method public final com.google.cloud.firestore.pipeline.stages.UnnestOptions withSection(String, com.google.cloud.firestore.pipeline.stages.GenericOptions); + } + + public final class Where extends com.google.cloud.firestore.pipeline.stages.Stage { + ctor public Where(com.google.cloud.firestore.pipeline.expressions.BooleanExpr); + } + +} + package com.google.cloud.firestore.spi.v1 { public interface FirestoreRpc { @@ -848,6 +1663,7 @@ package com.google.cloud.firestore.spi.v1 { method public UnaryCallable batchWriteCallable(); method public UnaryCallable beginTransactionCallable(); method public UnaryCallable commitCallable(); + method public ServerStreamingCallable executePipelineCallable(); method public ScheduledExecutorService getExecutor(); method public UnaryCallable listCollectionIdsPagedCallable(); method public UnaryCallable listDocumentsPagedCallable(); @@ -867,6 +1683,7 @@ package com.google.cloud.firestore.spi.v1 { method public UnaryCallable beginTransactionCallable(); method public void close(); method public UnaryCallable commitCallable(); + method public ServerStreamingCallable executePipelineCallable(); method public ScheduledExecutorService getExecutor(); method public UnaryCallable listCollectionIdsPagedCallable(); method public UnaryCallable listDocumentsPagedCallable(); @@ -881,6 +1698,97 @@ package com.google.cloud.firestore.spi.v1 { } +package com.google.cloud.firestore.telemetry { + + public class DisabledTraceUtil implements com.google.cloud.firestore.telemetry.TraceUtil { + ctor public DisabledTraceUtil(); + method public com.google.cloud.firestore.telemetry.TraceUtil.Context currentContext(); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span currentSpan(); + method @Nullable public ApiFunction getChannelConfigurator(); + method public com.google.cloud.firestore.telemetry.DisabledTraceUtil.Span startSpan(String); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span startSpan(String, com.google.cloud.firestore.telemetry.TraceUtil.Context); + } + + public class EnabledTraceUtil implements com.google.cloud.firestore.telemetry.TraceUtil { + method public com.google.cloud.firestore.telemetry.TraceUtil.Context currentContext(); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span currentSpan(); + method @Nullable public ApiFunction getChannelConfigurator(); + method public OpenTelemetry getOpenTelemetry(); + method public com.google.cloud.firestore.telemetry.EnabledTraceUtil.Span startSpan(String); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span startSpan(String, com.google.cloud.firestore.telemetry.TraceUtil.Context); + } + + public class EnabledTraceUtil.OpenTelemetryGrpcChannelConfigurator { + ctor public EnabledTraceUtil.OpenTelemetryGrpcChannelConfigurator(); + method public ManagedChannelBuilder apply(ManagedChannelBuilder); + } + + public interface TraceUtil { + method public com.google.cloud.firestore.telemetry.TraceUtil.Context currentContext(); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span currentSpan(); + method @Nullable public ApiFunction getChannelConfigurator(); + method public static com.google.cloud.firestore.telemetry.TraceUtil getInstance(com.google.cloud.firestore.FirestoreOptions); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span startSpan(String); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span startSpan(String, com.google.cloud.firestore.telemetry.TraceUtil.Context); + field public static final String ATTRIBUTE_KEY_ATTEMPT = "attempt"; + field public static final String ATTRIBUTE_KEY_ATTEMPTS_ALLOWED = "attempts_allowed"; + field public static final String ATTRIBUTE_KEY_ATTEMPTS_REMAINING = "attempts_remaining"; + field public static final String ATTRIBUTE_KEY_DOC_COUNT = "doc_count"; + field public static final String ATTRIBUTE_KEY_IS_RETRY_WITH_CURSOR = "retry_query_with_cursor"; + field public static final String ATTRIBUTE_KEY_IS_TRANSACTIONAL = "transactional"; + field public static final String ATTRIBUTE_KEY_NUM_RESPONSES = "response_count"; + field public static final String ATTRIBUTE_KEY_TRANSACTION_TYPE = "transaction_type"; + field public static final String ATTRIBUTE_SERVICE_PREFIX = "gcp.firestore."; + field public static final String ENABLE_TRACING_ENV_VAR = "FIRESTORE_ENABLE_TRACING"; + field public static final String LIBRARY_NAME = "com.google.cloud.firestore"; + field public static final String SPAN_NAME_AGGREGATION_QUERY_GET = "AggregationQuery.Get"; + field public static final String SPAN_NAME_BATCH_COMMIT = "Batch.Commit"; + field public static final String SPAN_NAME_BATCH_GET_DOCUMENTS = "BatchGetDocuments"; + field public static final String SPAN_NAME_BULK_WRITER_COMMIT = "BulkWriter.Commit"; + field public static final String SPAN_NAME_COL_REF_ADD = "CollectionReference.Add"; + field public static final String SPAN_NAME_COL_REF_LIST_DOCUMENTS = "CollectionReference.ListDocuments"; + field public static final String SPAN_NAME_DOC_REF_CREATE = "DocumentReference.Create"; + field public static final String SPAN_NAME_DOC_REF_DELETE = "DocumentReference.Delete"; + field public static final String SPAN_NAME_DOC_REF_GET = "DocumentReference.Get"; + field public static final String SPAN_NAME_DOC_REF_LIST_COLLECTIONS = "DocumentReference.ListCollections"; + field public static final String SPAN_NAME_DOC_REF_SET = "DocumentReference.Set"; + field public static final String SPAN_NAME_DOC_REF_UPDATE = "DocumentReference.Update"; + field public static final String SPAN_NAME_PARTITION_QUERY = "PartitionQuery"; + field public static final String SPAN_NAME_QUERY_GET = "Query.Get"; + field public static final String SPAN_NAME_RUN_AGGREGATION_QUERY = "RunAggregationQuery"; + field public static final String SPAN_NAME_RUN_QUERY = "RunQuery"; + field public static final String SPAN_NAME_TRANSACTION_BEGIN = "Transaction.Begin"; + field public static final String SPAN_NAME_TRANSACTION_COMMIT = "Transaction.Commit"; + field public static final String SPAN_NAME_TRANSACTION_GET_AGGREGATION_QUERY = "Transaction.Get.AggregationQuery"; + field public static final String SPAN_NAME_TRANSACTION_GET_DOCUMENT = "Transaction.Get.Document"; + field public static final String SPAN_NAME_TRANSACTION_GET_DOCUMENTS = "Transaction.Get.Documents"; + field public static final String SPAN_NAME_TRANSACTION_GET_QUERY = "Transaction.Get.Query"; + field public static final String SPAN_NAME_TRANSACTION_ROLLBACK = "Transaction.Rollback"; + field public static final String SPAN_NAME_TRANSACTION_RUN = "Transaction.Run"; + } + + public static interface TraceUtil.Context { + method public com.google.cloud.firestore.telemetry.TraceUtil.Scope makeCurrent(); + } + + public static interface TraceUtil.Scope { + method public void close(); + } + + public static interface TraceUtil.Span { + method public com.google.cloud.firestore.telemetry.TraceUtil.Span addEvent(String); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span addEvent(String, Map); + method public void end(); + method public void end(Throwable); + method public void endAtFuture(ApiFuture); + method public com.google.cloud.firestore.telemetry.TraceUtil.Scope makeCurrent(); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span setAttribute(String, boolean); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span setAttribute(String, int); + method public com.google.cloud.firestore.telemetry.TraceUtil.Span setAttribute(String, String); + } + +} + package com.google.cloud.firestore.v1 { public class FirestoreClient { @@ -905,6 +1813,7 @@ package com.google.cloud.firestore.v1 { method public final void deleteDocument(DeleteDocumentRequest); method public final void deleteDocument(String); method public final UnaryCallable deleteDocumentCallable(); + method public final ServerStreamingCallable executePipelineCallable(); method public final Document getDocument(GetDocumentRequest); method public final UnaryCallable getDocumentCallable(); method public final com.google.cloud.firestore.v1.FirestoreSettings getSettings(); @@ -989,6 +1898,7 @@ package com.google.cloud.firestore.v1 { method public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder(); method public static TransportChannelProvider defaultTransportChannelProvider(); method public UnaryCallSettings deleteDocumentSettings(); + method public ServerStreamingCallSettings executePipelineSettings(); method public static String getDefaultEndpoint(); method public static List getDefaultServiceScopes(); method public UnaryCallSettings getDocumentSettings(); @@ -1020,6 +1930,7 @@ package com.google.cloud.firestore.v1 { method public UnaryCallSettings.Builder commitSettings(); method public UnaryCallSettings.Builder createDocumentSettings(); method public UnaryCallSettings.Builder deleteDocumentSettings(); + method public ServerStreamingCallSettings.Builder executePipelineSettings(); method public UnaryCallSettings.Builder getDocumentSettings(); method public com.google.cloud.firestore.v1.stub.FirestoreStubSettings.Builder getStubSettingsBuilder(); method public PagedCallSettings.Builder listCollectionIdsSettings(); @@ -1046,6 +1957,7 @@ package com.google.cloud.firestore.v1.stub { method public UnaryCallable commitCallable(); method public UnaryCallable createDocumentCallable(); method public UnaryCallable deleteDocumentCallable(); + method public ServerStreamingCallable executePipelineCallable(); method public UnaryCallable getDocumentCallable(); method public UnaryCallable listCollectionIdsCallable(); method public UnaryCallable listCollectionIdsPagedCallable(); @@ -1078,6 +1990,7 @@ package com.google.cloud.firestore.v1.stub { method public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder(); method public static TransportChannelProvider defaultTransportChannelProvider(); method public UnaryCallSettings deleteDocumentSettings(); + method public ServerStreamingCallSettings executePipelineSettings(); method public static String getDefaultEndpoint(); method public static String getDefaultMtlsEndpoint(); method public static List getDefaultServiceScopes(); @@ -1110,6 +2023,7 @@ package com.google.cloud.firestore.v1.stub { method public UnaryCallSettings.Builder commitSettings(); method public UnaryCallSettings.Builder createDocumentSettings(); method public UnaryCallSettings.Builder deleteDocumentSettings(); + method public ServerStreamingCallSettings.Builder executePipelineSettings(); method public UnaryCallSettings.Builder getDocumentSettings(); method public PagedCallSettings.Builder listCollectionIdsSettings(); method public PagedCallSettings.Builder listDocumentsSettings(); diff --git a/tools/pom.xml b/tools/pom.xml index 00704fc9c..0df5c2208 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -24,9 +24,14 @@ com.android.tools.metalava metalava - 1.0.0-alpha11 + 1.0.0-alpha13 runtime + + com.google.code.findbugs + jsr305 + 3.0.2 +