diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index d304652e1c..dc05a72762 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -1,4 +1,4 @@
-# Copyright 2023 Google LLC
+# 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.
@@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
- digest: sha256:6f431774e11cc46619cf093fd1481193c4024031073697fa18f0099b943aab88
-# created: 2023-12-01T19:50:20.444857406Z
+ digest: sha256:a6aa751984f1e905c3ae5a3aac78fc7b68210626ce91487dc7ff4f0a06f010cc
+# created: 2024-01-22T14:14:20.913785597Z
diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml
new file mode 100644
index 0000000000..87d8eb2be8
--- /dev/null
+++ b/.github/workflows/renovate_config_check.yaml
@@ -0,0 +1,25 @@
+name: Renovate Bot Config Validation
+
+on:
+ pull_request:
+ paths:
+ - 'renovate.json'
+
+jobs:
+ renovate_bot_config_validation:
+ runs-on: ubuntu-22.04
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '20'
+
+ - name: Install Renovate and Config Validator
+ run: |
+ npm install -g npm@latest
+ npm install --global renovate
+ renovate-config-validator
diff --git a/.github/workflows/unmanaged-dependency-check.yaml b/.github/workflows/unmanaged-dependency-check.yaml
new file mode 100644
index 0000000000..ef0f492d2f
--- /dev/null
+++ b/.github/workflows/unmanaged-dependency-check.yaml
@@ -0,0 +1,19 @@
+on:
+ pull_request:
+name: Unmanaged dependency check
+jobs:
+ unmanaged_dependency_check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ distribution: temurin
+ java-version: 11
+ - name: Install modules
+ shell: bash
+ run: .kokoro/build.sh
+ - name: Unmanaged dependency check
+ uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@unmanaged-dependencies-check-latest
+ with:
+ bom-path: google-cloud-firestore-bom/pom.xml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4279169666..f47fb6be37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,28 @@
# Changelog
+## [3.16.1](https://github.com/googleapis/java-firestore/compare/v3.16.0...v3.16.1) (2024-01-25)
+
+
+### Bug Fixes
+
+* `internalStream` should handle duplicate `onComplete`s. ([#1523](https://github.com/googleapis/java-firestore/issues/1523)) ([b3067d7](https://github.com/googleapis/java-firestore/commit/b3067d7b382ea5c4c9124a12a701abe2f7289503))
+* Allow an explicit MustExist precondition for update ([#1542](https://github.com/googleapis/java-firestore/issues/1542)) ([46e09aa](https://github.com/googleapis/java-firestore/commit/46e09aad7f6689d4dfe82bd284905d52edda4364))
+* **deps:** Update the Java code generator (gapic-generator-java) to 2.32.0 ([#1534](https://github.com/googleapis/java-firestore/issues/1534)) ([2281320](https://github.com/googleapis/java-firestore/commit/2281320fd924a1d6c259a493ce703a51f0cd8a03))
+* Make rollback best effort. ([#1515](https://github.com/googleapis/java-firestore/issues/1515)) ([4c39af5](https://github.com/googleapis/java-firestore/commit/4c39af50d6d416440164fc5d5360f3912cd8f01b))
+* Thread safe UpdateBuilder ([#1537](https://github.com/googleapis/java-firestore/issues/1537)) ([f9cdab5](https://github.com/googleapis/java-firestore/commit/f9cdab5885bd1d500c6fc412eb3090cea9347d0e))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.22.0 ([#1535](https://github.com/googleapis/java-firestore/issues/1535)) ([04c0e07](https://github.com/googleapis/java-firestore/commit/04c0e0736ddcd49eb42aacb31e2fc087b2a39754))
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.23.0 ([#1544](https://github.com/googleapis/java-firestore/issues/1544)) ([79713bf](https://github.com/googleapis/java-firestore/commit/79713bf0fa376a4d22518ae2f5da9660795d9f89))
+
+
+### Documentation
+
+* Fix formatting due to unclosed backtick ([#1529](https://github.com/googleapis/java-firestore/issues/1529)) ([3c78fe3](https://github.com/googleapis/java-firestore/commit/3c78fe3c248cb212c6e4f91a5bb7aeb8b9b003b0))
+* Rring BulkWriter out of BetaApi status. ([#1513](https://github.com/googleapis/java-firestore/issues/1513)) ([c2812f7](https://github.com/googleapis/java-firestore/commit/c2812f7cb72257512ffecc98ec1bdb1109d7d044))
+
## [3.16.0](https://github.com/googleapis/java-firestore/compare/v3.15.7...v3.16.0) (2024-01-10)
diff --git a/README.md b/README.md
index 1422de48aa..95c3790509 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloudlibraries-bom
- 26.29.0
+ 26.30.0pomimport
@@ -42,7 +42,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloudgoogle-cloud-firestore
- 3.15.7
+ 3.16.0
```
@@ -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.29.0')
+implementation platform('com.google.cloud:libraries-bom:26.30.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.15.7'
+implementation 'com.google.cloud:google-cloud-firestore:3.16.0'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.15.7"
+libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.16.0"
```
@@ -222,7 +222,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.15.7
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.16.0
[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/pom.xml b/google-cloud-firestore-admin/pom.xml
index 19d1d29730..273951aaa2 100644
--- a/google-cloud-firestore-admin/pom.xml
+++ b/google-cloud-firestore-admin/pom.xml
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0google-cloud-firestore-admin
- 3.16.0
+ 3.16.1jarGoogle Cloud Firestore Admin Clienthttps://github.com/googleapis/java-firestore
@@ -14,7 +14,7 @@
com.google.cloudgoogle-cloud-firestore-parent
- 3.16.0
+ 3.16.1
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 0ff74e0d53..49ceb63c44 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
@@ -125,280 +125,281 @@
*
Method
*
Description
*
Method Variants
+ *
*
- *
CreateIndex
+ *
CreateIndex
*
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].
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
createIndexAsync(CreateIndexRequest request)
+ *
createIndexAsync(CreateIndexRequest request)
*
*
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
- *
createIndexAsync(CollectionGroupName parent, Index index)
- *
createIndexAsync(String parent, Index index)
+ *
createIndexAsync(CollectionGroupName parent, Index index)
+ *
createIndexAsync(String parent, Index index)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
createIndexOperationCallable()
- *
createIndexCallable()
+ *
createIndexOperationCallable()
+ *
createIndexCallable()
*
*
*
*
- *
ListIndexes
+ *
ListIndexes
*
Lists composite indexes.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
listIndexes(ListIndexesRequest request)
+ *
listIndexes(ListIndexesRequest request)
*
*
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
- *
listIndexes(CollectionGroupName parent)
- *
listIndexes(String parent)
+ *
listIndexes(CollectionGroupName parent)
+ *
listIndexes(String parent)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
listIndexesPagedCallable()
- *
listIndexesCallable()
+ *
listIndexesPagedCallable()
+ *
listIndexesCallable()
*
*
*
*
- *
GetIndex
+ *
GetIndex
*
Gets a composite index.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
getIndex(GetIndexRequest request)
+ *
getIndex(GetIndexRequest request)
*
*
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
- *
getIndex(IndexName name)
- *
getIndex(String name)
+ *
getIndex(IndexName name)
+ *
getIndex(String name)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
getIndexCallable()
+ *
getIndexCallable()
*
*
*
*
- *
DeleteIndex
+ *
DeleteIndex
*
Deletes a composite index.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
deleteIndex(DeleteIndexRequest request)
+ *
deleteIndex(DeleteIndexRequest request)
*
*
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
- *
deleteIndex(IndexName name)
- *
deleteIndex(String name)
+ *
deleteIndex(IndexName name)
+ *
deleteIndex(String name)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
deleteIndexCallable()
+ *
deleteIndexCallable()
*
*
*
*
- *
GetField
+ *
GetField
*
Gets the metadata and configuration for a Field.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
getField(GetFieldRequest request)
+ *
getField(GetFieldRequest request)
*
*
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
- *
getField(FieldName name)
- *
getField(String name)
+ *
getField(FieldName name)
+ *
getField(String name)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
getFieldCallable()
+ *
getFieldCallable()
*
*
*
*
- *
UpdateField
+ *
UpdateField
*
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/*`.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
updateFieldAsync(UpdateFieldRequest request)
+ *
updateFieldAsync(UpdateFieldRequest request)
*
*
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
- *
updateFieldAsync(Field field)
+ *
updateFieldAsync(Field field)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
updateFieldOperationCallable()
- *
updateFieldCallable()
+ *
updateFieldOperationCallable()
+ *
updateFieldCallable()
*
*
*
*
- *
ListFields
+ *
ListFields
*
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:*`.
+ *
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:*`.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
listFields(ListFieldsRequest request)
+ *
listFields(ListFieldsRequest request)
*
*
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
- *
listFields(CollectionGroupName parent)
- *
listFields(String parent)
+ *
listFields(CollectionGroupName parent)
+ *
listFields(String parent)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
listFieldsPagedCallable()
- *
listFieldsCallable()
+ *
listFieldsPagedCallable()
+ *
listFieldsCallable()
*
*
*
*
- *
ExportDocuments
+ *
ExportDocuments
*
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
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
- *
exportDocumentsAsync(DatabaseName name)
- *
exportDocumentsAsync(String name)
+ *
exportDocumentsAsync(DatabaseName name)
+ *
exportDocumentsAsync(String name)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
exportDocumentsOperationCallable()
- *
exportDocumentsCallable()
+ *
exportDocumentsOperationCallable()
+ *
exportDocumentsCallable()
*
*
*
*
- *
ImportDocuments
+ *
ImportDocuments
*
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.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
- *
deleteDatabaseAsync(DatabaseName name)
- *
deleteDatabaseAsync(String name)
+ *
deleteDatabaseAsync(DatabaseName name)
+ *
deleteDatabaseAsync(String name)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
deleteDatabaseOperationCallable()
- *
deleteDatabaseCallable()
+ *
deleteDatabaseOperationCallable()
+ *
deleteDatabaseCallable()
*
*
*
@@ -1379,7 +1380,7 @@ public final UnaryCallable updateFieldCallable()
*
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:*`.
+ * filter set to `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`.
*
*
Sample code:
*
@@ -1415,7 +1416,7 @@ public final ListFieldsPagedResponse listFields(CollectionGroupName parent) {
*
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:*`.
+ * filter set to `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`.
*
*
Sample code:
*
@@ -1449,7 +1450,7 @@ public final ListFieldsPagedResponse listFields(String parent) {
*
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:*`.
+ * filter set to `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`.
*
*
Sample code:
*
@@ -1488,7 +1489,7 @@ public final ListFieldsPagedResponse listFields(ListFieldsRequest request) {
*
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:*`.
+ * filter set to `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`.
*
*
Sample code:
*
@@ -1526,7 +1527,7 @@ public final UnaryCallable listField
*
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:*`.
+ * filter set to `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`.
*
*
Sample code:
*
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 2be7176acd..e7416e878c 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
@@ -403,6 +403,15 @@ public FirestoreAdminStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
+ /** Returns the endpoint set by the user or the the service's default endpoint. */
+ @Override
+ public String getEndpoint() {
+ if (super.getEndpoint() != null) {
+ return super.getEndpoint();
+ }
+ return getDefaultEndpoint();
+ }
+
/** Returns the default service name. */
@Override
public String getServiceName() {
@@ -713,7 +722,6 @@ private static Builder createDefault() {
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
@@ -726,7 +734,6 @@ private static Builder createHttpJsonDefault() {
builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
@@ -1119,6 +1126,15 @@ public UnaryCallSettings.Builder deleteDatabas
return deleteDatabaseOperationSettings;
}
+ /** Returns the endpoint set by the user or the the service's default endpoint. */
+ @Override
+ public String getEndpoint() {
+ if (super.getEndpoint() != null) {
+ return super.getEndpoint();
+ }
+ return getDefaultEndpoint();
+ }
+
@Override
public FirestoreAdminStubSettings build() throws IOException {
return new FirestoreAdminStubSettings(this);
diff --git a/google-cloud-firestore-bom/pom.xml b/google-cloud-firestore-bom/pom.xml
index 26ae50a2d9..2439bbff05 100644
--- a/google-cloud-firestore-bom/pom.xml
+++ b/google-cloud-firestore-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0com.google.cloudgoogle-cloud-firestore-bom
- 3.16.0
+ 3.16.1pomcom.google.cloud
@@ -52,37 +52,37 @@
com.google.cloudgoogle-cloud-firestore
- 3.16.0
+ 3.16.1com.google.cloudgoogle-cloud-firestore-admin
- 3.16.0
+ 3.16.1com.google.api.grpcgrpc-google-cloud-firestore-admin-v1
- 3.16.0
+ 3.16.1com.google.api.grpcgrpc-google-cloud-firestore-v1
- 3.16.0
+ 3.16.1com.google.api.grpcproto-google-cloud-firestore-admin-v1
- 3.16.0
+ 3.16.1com.google.api.grpcproto-google-cloud-firestore-v1
- 3.16.0
+ 3.16.1com.google.cloudproto-google-cloud-firestore-bundle-v1
- 3.16.0
+ 3.16.1
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
rollbackCallable()
+ *
rollbackCallable()
*
*
*
*
- *
RunQuery
+ *
RunQuery
*
Runs a query.
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
runQueryCallable()
+ *
runQueryCallable()
*
*
*
*
- *
RunAggregationQuery
+ *
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.
*
High-Level Example:
@@ -254,91 +255,91 @@
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
runAggregationQueryCallable()
+ *
runAggregationQueryCallable()
*
*
*
*
- *
PartitionQuery
+ *
PartitionQuery
*
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.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
partitionQuery(PartitionQueryRequest request)
+ *
partitionQuery(PartitionQueryRequest request)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
partitionQueryPagedCallable()
- *
partitionQueryCallable()
+ *
partitionQueryPagedCallable()
+ *
partitionQueryCallable()
*
*
*
*
- *
Write
+ *
Write
*
Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
writeCallable()
+ *
writeCallable()
*
*
*
*
- *
Listen
+ *
Listen
*
Listens to changes. This method is only available via gRPC or WebChannel (not REST).
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
listenCallable()
+ *
listenCallable()
*
*
*
*
- *
ListCollectionIds
+ *
ListCollectionIds
*
Lists all the collection IDs underneath a document.
*
*
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.
*
- *
listCollectionIds(String parent)
+ *
listCollectionIds(String parent)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
listCollectionIdsPagedCallable()
- *
listCollectionIdsCallable()
+ *
listCollectionIdsPagedCallable()
+ *
listCollectionIdsCallable()
*
*
*
*
- *
BatchWrite
+ *
BatchWrite
*
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.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
batchWrite(BatchWriteRequest request)
+ *
batchWrite(BatchWriteRequest request)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
batchWriteCallable()
+ *
batchWriteCallable()
*
*
*
*
- *
CreateDocument
+ *
CreateDocument
*
Creates a new document.
*
*
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
- *
createDocument(CreateDocumentRequest request)
+ *
createDocument(CreateDocumentRequest request)
*
*
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
- *
createDocumentCallable()
+ *
createDocumentCallable()
*
*
*
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 65345559b0..f34ce93613 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
@@ -426,6 +426,15 @@ public FirestoreStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
+ /** Returns the endpoint set by the user or the the service's default endpoint. */
+ @Override
+ public String getEndpoint() {
+ if (super.getEndpoint() != null) {
+ return super.getEndpoint();
+ }
+ return getDefaultEndpoint();
+ }
+
/** Returns the default service name. */
@Override
public String getServiceName() {
@@ -769,7 +778,6 @@ private static Builder createDefault() {
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
@@ -782,7 +790,6 @@ private static Builder createHttpJsonDefault() {
builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
@@ -969,6 +976,15 @@ public UnaryCallSettings.Builder createDocument
return createDocumentSettings;
}
+ /** Returns the endpoint set by the user or the the service's default endpoint. */
+ @Override
+ public String getEndpoint() {
+ if (super.getEndpoint() != null) {
+ return super.getEndpoint();
+ }
+ return getDefaultEndpoint();
+ }
+
@Override
public FirestoreStubSettings build() throws IOException {
return new FirestoreStubSettings(this);
diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java
index a871884020..706412dae9 100644
--- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java
+++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java
@@ -16,6 +16,7 @@
package com.google.cloud.firestore;
+import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
@@ -83,6 +84,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import org.mockito.ArgumentCaptor;
@@ -1195,10 +1197,10 @@ public RequestResponsePair(
* `sendRequest()` is called.
*/
static class ResponseStubber {
- int requestCount = 0;
-
List operationList = new ArrayList<>();
+ List