diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 090264303..91bb69e63 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:5ee35ee919254a3d1e7d4f8abbf1b8c8869ade317ceb2e4df709af1b4b3e9ca1 + digest: sha256:bf5639d265d70f6137d57d42ae781a6f4e26d4085ff4e018e71350480f9b3996 diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index b19a8dbfd..2092cc741 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -1,5 +1,5 @@ gcp-docuploader -gcp-releasetool +gcp-releasetool>=1.10.5 # required for compatibility with cryptography>=39.x wheel setuptools typing-extensions diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index cfadd22ce..c80f0a87c 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile --allow-unsafe --generate-hashes requirements.in @@ -126,9 +126,9 @@ gcp-docuploader==0.6.4 \ --hash=sha256:01486419e24633af78fd0167db74a2763974765ee8078ca6eb6964d0ebd388af \ --hash=sha256:70861190c123d907b3b067da896265ead2eeb9263969d6955c9e0bb091b5ccbf # via -r requirements.in -gcp-releasetool==1.9.1 \ - --hash=sha256:952f4055d5d986b070ae2a71c4410b250000f9cc5a1e26398fcd55a5bbc5a15f \ - --hash=sha256:d0d3c814a97c1a237517e837d8cfa668ced8df4b882452578ecef4a4e79c583b +gcp-releasetool==1.10.5 \ + --hash=sha256:174b7b102d704b254f2a26a3eda2c684fd3543320ec239baf771542a2e58e109 \ + --hash=sha256:e29d29927fe2ca493105a82958c6873bb2b90d503acac56be2c229e74de0eec9 # via -r requirements.in google-api-core==2.8.2 \ --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ @@ -374,6 +374,10 @@ secretstorage==3.3.3 \ --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 # via keyring +setuptools==67.3.2 \ + --hash=sha256:95f00380ef2ffa41d9bba85d95b27689d923c93dfbafed4aecd7cf988a25e012 \ + --hash=sha256:bb6d8e508de562768f2027902929f8523932fcd1fb784e6d573d2cafac995a48 + # via -r requirements.in six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 diff --git a/.readme-partials.yaml b/.readme-partials.yaml index 971616778..9823b5c70 100644 --- a/.readme-partials.yaml +++ b/.readme-partials.yaml @@ -81,7 +81,7 @@ custom_content: | #### Updating data Another thing you'll probably want to do is update your data. The following snippet shows how to update a Datastore entity if it exists. - ``` java + ```java KeyFactory keyFactory = datastore.newKeyFactory().setKind("keyKind"); Key key = keyFactory.newKey("keyName"); Entity entity = datastore.get(key); @@ -95,12 +95,12 @@ custom_content: | ``` The complete source code can be found at - [UpdateEntity.java](../../google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/UpdateEntity.java). + [UpdateEntity.java](https://github.com/googleapis/google-cloud-java/blob/2c1850d4f82f3fbd7b4a50582384c008085aa1a8/google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/UpdateEntity.java). #### Complete source code In - [AddEntitiesAndRunQuery.java](../../google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/AddEntitiesAndRunQuery.java) + [AddEntitiesAndRunQuery.java](https://github.com/googleapis/google-cloud-java/blob/2c1850d4f82f3fbd7b4a50582384c008085aa1a8/google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/AddEntitiesAndRunQuery.java) we put together all the code to store data and run queries into one program. The program assumes that you are running on Compute Engine or from your own desktop. To run the example on App Engine, simply move the code from the main method to your application's servlet class and change the print statements to @@ -110,8 +110,34 @@ custom_content: | ------- This library has tools to help write tests for code that uses the Datastore. + + #### On your machine + + You can test against a temporary local Datastore by following these steps: - See [TESTING.md](https://github.com/googleapis/google-cloud-java/blob/main/TESTING.md#testing-code-that-uses-datastore) to read more about testing. + 1. [Install Cloud SDK and start the emulator](https://cloud.google.com/datastore/docs/tools/datastore-emulator) + + To determine which host/port the emulator is running on: + + ``` + $ gcloud beta emulators datastore env-init + + # Sample output: + # export DATASTORE_EMULATOR_HOST=localhost:8759 + ``` + + 3. Point your client to the emulator + + ```java + DatastoreOptions options = DatastoreOptions.newBuilder() + .setProjectId(DatastoreOptions.getDefaultProjectId()) + .setHost(System.getenv("DATASTORE_EMULATOR_HOST")) + .setCredentials(NoCredentials.getInstance()) + .setRetrySettings(ServiceOptions.getNoRetrySettings()) + .build(); + Datastore datastore = options.getService(); + ``` + 4. Run your tests Example Applications -------------------- diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e7b78853..4ef27c5ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## [2.14.2](https://github.com/googleapis/java-datastore/compare/v2.14.1...v2.14.2) (2023-03-29) + + +### Documentation + +* Adds OR filter sample ([#1032](https://github.com/googleapis/java-datastore/issues/1032)) ([e319efa](https://github.com/googleapis/java-datastore/commit/e319efa402539f0297179d270aa8c8f50e6e3e93)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.6.0 ([#1035](https://github.com/googleapis/java-datastore/issues/1035)) ([b2f4cb3](https://github.com/googleapis/java-datastore/commit/b2f4cb361afb1398b10edc0fcfe744b414926e07)) +* Update gapic-generator-java to 2.16.0 ([8c96c55](https://github.com/googleapis/java-datastore/commit/8c96c555159d48f1dc6d53616f0412f60e3095d7)) + +## [2.14.1](https://github.com/googleapis/java-datastore/compare/v2.14.0...v2.14.1) (2023-03-20) + + +### Documentation + +* Fix broken link to UpdateEntity snippet ([#1022](https://github.com/googleapis/java-datastore/issues/1022)) ([6880604](https://github.com/googleapis/java-datastore/commit/6880604b6b88caf8e03449349d0815d388cfb1a3)), closes [#1010](https://github.com/googleapis/java-datastore/issues/1010) +* Fix broken README links ([#1011](https://github.com/googleapis/java-datastore/issues/1011)) ([276174e](https://github.com/googleapis/java-datastore/commit/276174e26ff92be2bdeb24f733278d2042519cfd)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.5.0 ([#1024](https://github.com/googleapis/java-datastore/issues/1024)) ([4a57e95](https://github.com/googleapis/java-datastore/commit/4a57e959dbac14d395ff202fd479f776c84b25e5)) +* Upgrade gapic-generator-java to 2.15.3 ([091d197](https://github.com/googleapis/java-datastore/commit/091d1976c24c1bec7a7974bcffb246d2a16d790c)) + +## [2.14.0](https://github.com/googleapis/java-datastore/compare/v2.13.6...v2.14.0) (2023-03-08) + + +### Features + +* OR query support ([#993](https://github.com/googleapis/java-datastore/issues/993)) ([99b7843](https://github.com/googleapis/java-datastore/commit/99b784332919ccc813a94ba17beaaa11b02b1c8e)) + +## [2.13.6](https://github.com/googleapis/java-datastore/compare/v2.13.5...v2.13.6) (2023-03-02) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.4.0 ([#1001](https://github.com/googleapis/java-datastore/issues/1001)) ([a230e03](https://github.com/googleapis/java-datastore/commit/a230e030fadc11c72f6ced51e566d59439bc1c6e)) + ## [2.13.5](https://github.com/googleapis/java-datastore/compare/v2.13.4...v2.13.5) (2023-02-17) diff --git a/README.md b/README.md index e47a300bb..e0563a10b 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.cloud libraries-bom - 26.8.0 + 26.11.0 pom import @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-datastore - 2.13.4 + 2.14.1 ``` @@ -49,21 +49,22 @@ If you are using Maven without 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.8.0') +implementation platform('com.google.cloud:libraries-bom:26.11.0') implementation 'com.google.cloud:google-cloud-datastore' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-datastore:2.13.4' +implementation 'com.google.cloud:google-cloud-datastore:2.14.1' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.13.4" +libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.14.1" ``` + ## Authentication @@ -80,7 +81,7 @@ The client application making API calls must be granted [authorization scopes][a You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Datastore [API enabled][enable-api]. [Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by -[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. ### Installation and setup @@ -183,7 +184,7 @@ Cloud Datastore relies on indexing to run queries. Indexing is turned on by defa #### Updating data Another thing you'll probably want to do is update your data. The following snippet shows how to update a Datastore entity if it exists. -``` java +```java KeyFactory keyFactory = datastore.newKeyFactory().setKind("keyKind"); Key key = keyFactory.newKey("keyName"); Entity entity = datastore.get(key); @@ -197,12 +198,12 @@ if (entity != null) { ``` The complete source code can be found at -[UpdateEntity.java](../../google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/UpdateEntity.java). +[UpdateEntity.java](https://github.com/googleapis/google-cloud-java/blob/2c1850d4f82f3fbd7b4a50582384c008085aa1a8/google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/UpdateEntity.java). #### Complete source code In -[AddEntitiesAndRunQuery.java](../../google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/AddEntitiesAndRunQuery.java) +[AddEntitiesAndRunQuery.java](https://github.com/googleapis/google-cloud-java/blob/2c1850d4f82f3fbd7b4a50582384c008085aa1a8/google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/AddEntitiesAndRunQuery.java) we put together all the code to store data and run queries into one program. The program assumes that you are running on Compute Engine or from your own desktop. To run the example on App Engine, simply move the code from the main method to your application's servlet class and change the print statements to @@ -213,7 +214,33 @@ Testing This library has tools to help write tests for code that uses the Datastore. -See [TESTING.md](https://github.com/googleapis/google-cloud-java/blob/main/TESTING.md#testing-code-that-uses-datastore) to read more about testing. +#### On your machine + +You can test against a temporary local Datastore by following these steps: + +1. [Install Cloud SDK and start the emulator](https://cloud.google.com/datastore/docs/tools/datastore-emulator) + +To determine which host/port the emulator is running on: + +``` +$ gcloud beta emulators datastore env-init + +# Sample output: +# export DATASTORE_EMULATOR_HOST=localhost:8759 +``` + +3. Point your client to the emulator + +```java +DatastoreOptions options = DatastoreOptions.newBuilder() +.setProjectId(DatastoreOptions.getDefaultProjectId()) +.setHost(System.getenv("DATASTORE_EMULATOR_HOST")) +.setCredentials(NoCredentials.getInstance()) +.setRetrySettings(ServiceOptions.getNoRetrySettings()) +.build(); +Datastore datastore = options.getService(); +``` +4. Run your tests Example Applications -------------------- @@ -241,6 +268,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-datastore/tre | Count Aggregation With Order By | [source code](https://github.com/googleapis/java-datastore/blob/main/samples/snippets/src/main/java/com/example/datastore/aggregation/CountAggregationWithOrderBy.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datastore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/datastore/aggregation/CountAggregationWithOrderBy.java) | | Count Aggregation With Property Filter | [source code](https://github.com/googleapis/java-datastore/blob/main/samples/snippets/src/main/java/com/example/datastore/aggregation/CountAggregationWithPropertyFilter.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datastore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/datastore/aggregation/CountAggregationWithPropertyFilter.java) | | Count Aggregation With Stale Read | [source code](https://github.com/googleapis/java-datastore/blob/main/samples/snippets/src/main/java/com/example/datastore/aggregation/CountAggregationWithStaleRead.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datastore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/datastore/aggregation/CountAggregationWithStaleRead.java) | +| Create a union between two filters | [source code](https://github.com/googleapis/java-datastore/blob/main/samples/snippets/src/main/java/com/example/datastore/filters/OrFilterQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datastore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/datastore/filters/OrFilterQuery.java) | | Task List | [source code](https://github.com/googleapis/java-datastore/blob/main/samples/snippets/src/main/java/com/google/datastore/snippets/TaskList.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datastore&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/datastore/snippets/TaskList.java) | @@ -341,14 +369,14 @@ 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-datastore/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-datastore.svg -[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datastore&core=gav +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datastore/2.14.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 [iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects -[cloud-sdk]: https://cloud.google.com/sdk/ +[cloud-cli]: https://cloud.google.com/cli [troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting [contributing]: https://github.com/googleapis/java-datastore/blob/main/CONTRIBUTING.md [code-of-conduct]: https://github.com/googleapis/java-datastore/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct diff --git a/datastore-v1-proto-client/pom.xml b/datastore-v1-proto-client/pom.xml index 0bd73168c..7a23346d3 100644 --- a/datastore-v1-proto-client/pom.xml +++ b/datastore-v1-proto-client/pom.xml @@ -19,12 +19,12 @@ 4.0.0 com.google.cloud.datastore datastore-v1-proto-client - 2.13.5 + 2.14.2 com.google.cloud google-cloud-datastore-parent - 2.13.5 + 2.14.2 jar diff --git a/google-cloud-datastore-bom/pom.xml b/google-cloud-datastore-bom/pom.xml index 4b27cbcdd..76f5e4064 100644 --- a/google-cloud-datastore-bom/pom.xml +++ b/google-cloud-datastore-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-datastore-bom - 2.13.5 + 2.14.2 pom com.google.cloud @@ -52,22 +52,22 @@ com.google.cloud google-cloud-datastore - 2.13.5 + 2.14.2 com.google.api.grpc grpc-google-cloud-datastore-admin-v1 - 2.13.5 + 2.14.2 com.google.api.grpc proto-google-cloud-datastore-v1 - 0.104.5 + 0.105.2 com.google.api.grpc proto-google-cloud-datastore-admin-v1 - 2.13.5 + 2.14.2 diff --git a/google-cloud-datastore/pom.xml b/google-cloud-datastore/pom.xml index 3f3b4c325..26b0ce227 100644 --- a/google-cloud-datastore/pom.xml +++ b/google-cloud-datastore/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-datastore - 2.13.5 + 2.14.2 jar Google Cloud Datastore https://github.com/googleapis/java-datastore @@ -12,7 +12,7 @@ com.google.cloud google-cloud-datastore-parent - 2.13.5 + 2.14.2 google-cloud-datastore diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java index b394dcd97..a6195ad27 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java @@ -26,6 +26,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.cloud.StringEnumType; import com.google.cloud.StringEnumValue; @@ -151,6 +152,8 @@ public Operator apply(String constant) { static final Operator AND = type.createAndRegister("AND"); + static final Operator OR = type.createAndRegister("OR"); + com.google.datastore.v1.CompositeFilter.Operator toPb() { return com.google.datastore.v1.CompositeFilter.Operator.valueOf(name()); } @@ -231,6 +234,11 @@ public static CompositeFilter and(Filter first, Filter... other) { return new CompositeFilter(Operator.AND, first, other); } + @BetaApi + public static CompositeFilter or(Filter first, Filter... other) { + return new CompositeFilter(Operator.OR, first, other); + } + @Override com.google.datastore.v1.Filter toPb() { com.google.datastore.v1.Filter.Builder filterPb = com.google.datastore.v1.Filter.newBuilder(); diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java index 131c12763..fda56e1e8 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.datastore.admin.v1.DatastoreAdminClient.ListIndexesPagedResponse; +import com.google.api.HttpRule; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; @@ -33,6 +34,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.datastore.admin.v1.CreateIndexRequest; import com.google.datastore.admin.v1.DeleteIndexRequest; import com.google.datastore.admin.v1.ExportEntitiesMetadata; @@ -365,7 +367,26 @@ protected HttpJsonDatastoreAdminStub( throws IOException { this.callableFactory = callableFactory; this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder().setDelete("/v1/{name=projects/*/operations/*}").build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder().setGet("/v1/{name=projects/*/operations/*}").build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder().setGet("/v1/{name=projects/*}/operations").build()) + .build()); HttpJsonCallSettings exportEntitiesTransportSettings = HttpJsonCallSettings.newBuilder() diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/package-info.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/package-info.java index f0f35511f..735b8c35a 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/package-info.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/package-info.java @@ -36,7 +36,7 @@ * *

This second example shows how to get and update a Datastore entity if it exists. For the * complete source code see + * href="https://github.com/googleapis/google-cloud-java/blob/4f9e98b21264028901878b8a11204868eca858ce/google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/UpdateEntity.java"> * UpdateEntity.java. * *

{@code
diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/SerializationTest.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/SerializationTest.java
index 105386515..1b8186a54 100644
--- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/SerializationTest.java
+++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/SerializationTest.java
@@ -69,6 +69,19 @@ public class SerializationTest extends BaseSerializationTest {
           .addDistinctOn("p")
           .addOrderBy(OrderBy.asc("p"))
           .build();
+  private static final Query QUERY4 =
+      Query.newProjectionEntityQueryBuilder()
+          .setKind("k")
+          .setNamespace("ns1")
+          .addProjection("p")
+          .setLimit(100)
+          .setOffset(5)
+          .setStartCursor(CURSOR1)
+          .setEndCursor(CURSOR2)
+          .setFilter(CompositeFilter.or(PropertyFilter.gt("p1", 10), PropertyFilter.eq("a", "v")))
+          .addDistinctOn("p")
+          .addOrderBy(OrderBy.asc("p"))
+          .build();
   private static final KeyValue KEY_VALUE = KeyValue.of(KEY1);
   private static final NullValue NULL_VALUE =
       NullValue.newBuilder().setExcludeFromIndexes(true).build();
@@ -136,6 +149,7 @@ protected java.io.Serializable[] serializableObjects() {
       QUERY1,
       QUERY2,
       QUERY3,
+      QUERY4,
       NULL_VALUE,
       KEY_VALUE,
       STRING_VALUE,
diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/StructuredQueryTest.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/StructuredQueryTest.java
index b3f4b944a..c59337586 100644
--- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/StructuredQueryTest.java
+++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/StructuredQueryTest.java
@@ -37,8 +37,10 @@ public class StructuredQueryTest {
   private static final Cursor END_CURSOR = Cursor.copyFrom(new byte[] {10});
   private static final int OFFSET = 42;
   private static final Integer LIMIT = 43;
-  private static final Filter FILTER =
+  private static final Filter AND_FILTER =
       CompositeFilter.and(PropertyFilter.gt("p1", 10), PropertyFilter.eq("a", "v"));
+  private static final Filter OR_FILTER =
+      CompositeFilter.or(PropertyFilter.gt("p1", 10), PropertyFilter.eq("a", "v"));
   private static final OrderBy ORDER_BY_1 = OrderBy.asc("p2");
   private static final OrderBy ORDER_BY_2 = OrderBy.desc("p3");
   private static final List ORDER_BY = ImmutableList.of(ORDER_BY_1, ORDER_BY_2);
@@ -56,7 +58,7 @@ public class StructuredQueryTest {
           .setEndCursor(END_CURSOR)
           .setOffset(OFFSET)
           .setLimit(LIMIT)
-          .setFilter(FILTER)
+          .setFilter(AND_FILTER)
           .setOrderBy(ORDER_BY_1, ORDER_BY_2)
           .build();
   private static final KeyQuery KEY_QUERY =
@@ -67,7 +69,7 @@ public class StructuredQueryTest {
           .setEndCursor(END_CURSOR)
           .setOffset(OFFSET)
           .setLimit(LIMIT)
-          .setFilter(FILTER)
+          .setFilter(OR_FILTER)
           .setOrderBy(ORDER_BY_1, ORDER_BY_2)
           .build();
   private static final ProjectionEntityQuery PROJECTION_QUERY =
@@ -78,7 +80,7 @@ public class StructuredQueryTest {
           .setEndCursor(END_CURSOR)
           .setOffset(OFFSET)
           .setLimit(LIMIT)
-          .setFilter(FILTER)
+          .setFilter(AND_FILTER)
           .setOrderBy(ORDER_BY_1, ORDER_BY_2)
           .setProjection(PROJECTION1, PROJECTION2)
           .setDistinctOn(DISTINCT_ON1, DISTINCT_ON2)
@@ -93,7 +95,14 @@ public void testEntityQueryBuilder() {
 
   @Test
   public void testKeyQueryBuilder() {
-    compareBaseBuilderFields(KEY_QUERY);
+    assertEquals(NAMESPACE, KEY_QUERY.getNamespace());
+    assertEquals(KIND, KEY_QUERY.getKind());
+    assertEquals(START_CURSOR, KEY_QUERY.getStartCursor());
+    assertEquals(END_CURSOR, KEY_QUERY.getEndCursor());
+    assertEquals(OFFSET, KEY_QUERY.getOffset());
+    assertEquals(LIMIT, KEY_QUERY.getLimit());
+    assertEquals(OR_FILTER, KEY_QUERY.getFilter());
+    assertEquals(ORDER_BY, KEY_QUERY.getOrderBy());
     assertEquals(ImmutableList.of(StructuredQuery.KEY_PROPERTY_NAME), KEY_QUERY.getProjection());
     assertTrue(KEY_QUERY.getDistinctOn().isEmpty());
   }
@@ -112,7 +121,7 @@ private void compareBaseBuilderFields(StructuredQuery query) {
     assertEquals(END_CURSOR, query.getEndCursor());
     assertEquals(OFFSET, query.getOffset());
     assertEquals(LIMIT, query.getLimit());
-    assertEquals(FILTER, query.getFilter());
+    assertEquals(AND_FILTER, query.getFilter());
     assertEquals(ORDER_BY, query.getOrderBy());
   }
 
diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/it/ITDatastoreTest.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/it/ITDatastoreTest.java
index b8c3bb4b6..f010d8135 100644
--- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/it/ITDatastoreTest.java
+++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/it/ITDatastoreTest.java
@@ -59,6 +59,7 @@
 import com.google.cloud.datastore.ReadOption;
 import com.google.cloud.datastore.StringValue;
 import com.google.cloud.datastore.StructuredQuery;
+import com.google.cloud.datastore.StructuredQuery.CompositeFilter;
 import com.google.cloud.datastore.StructuredQuery.OrderBy;
 import com.google.cloud.datastore.StructuredQuery.PropertyFilter;
 import com.google.cloud.datastore.TimestampValue;
@@ -223,6 +224,85 @@ private  List makeResultsCopy(QueryResults scResults) {
     return results;
   }
 
+  @Test
+  public void orQuery() {
+    Key key = Key.newBuilder(KEY1, KIND2, 2).build();
+    Entity entity3 =
+        Entity.newBuilder(ENTITY1)
+            .setKey(key)
+            .remove("str")
+            .set("name", "Dan")
+            .setNull("null")
+            .set("age", 19)
+            .build();
+    DATASTORE.put(entity3);
+
+    // age == 19 || age == 20
+    CompositeFilter orFilter =
+        CompositeFilter.or(PropertyFilter.eq("age", 19), PropertyFilter.eq("age", 20));
+    Query simpleOrQuery =
+        Query.newEntityQueryBuilder()
+            .setNamespace(NAMESPACE)
+            .setKind(KIND2)
+            .setFilter(orFilter)
+            .build();
+    QueryResults results = DATASTORE.run(simpleOrQuery);
+    assertTrue(results.hasNext());
+    assertEquals(ENTITY2, results.next());
+    assertTrue(results.hasNext());
+    assertEquals(entity3, results.next());
+    assertFalse(results.hasNext());
+
+    // age == 19 || age == 20 with limit of 1
+    Query simpleOrQueryLimit =
+        Query.newEntityQueryBuilder()
+            .setNamespace(NAMESPACE)
+            .setKind(KIND2)
+            .setFilter(orFilter)
+            .setLimit(1)
+            .build();
+    QueryResults results2 = DATASTORE.run(simpleOrQueryLimit);
+    assertTrue(results2.hasNext());
+    assertEquals(ENTITY2, results2.next());
+    assertFalse(results2.hasNext());
+
+    // (age == 18 && name == Dan) || (age == 20 && name == Dan)
+    CompositeFilter nestedOr =
+        CompositeFilter.or(
+            CompositeFilter.and(PropertyFilter.eq("age", 18), PropertyFilter.eq("name", "Dan")),
+            CompositeFilter.and(PropertyFilter.eq("age", 20), PropertyFilter.eq("name", "Dan")));
+    CompositeFilter compositeFilter =
+        CompositeFilter.and(PropertyFilter.hasAncestor(ROOT_KEY), nestedOr);
+    Query orQueryNested =
+        Query.newEntityQueryBuilder()
+            .setNamespace(NAMESPACE)
+            .setKind(KIND2)
+            .setFilter(compositeFilter)
+            .build();
+    QueryResults results3 = DATASTORE.run(orQueryNested);
+    assertTrue(results3.hasNext());
+    assertEquals(ENTITY2, results3.next());
+    assertFalse(results3.hasNext());
+
+    // age == 20 && (name == Bob || name == Dan)
+    CompositeFilter nestedOr2 =
+        CompositeFilter.or(PropertyFilter.eq("name", "Dan"), PropertyFilter.eq("name", "Bob"));
+    CompositeFilter andFilter = CompositeFilter.and(PropertyFilter.eq("age", 20), nestedOr2);
+    CompositeFilter ancestorAndFilter =
+        CompositeFilter.and(PropertyFilter.hasAncestor(ROOT_KEY), andFilter);
+    Query orQueryNested2 =
+        Query.newEntityQueryBuilder()
+            .setNamespace(NAMESPACE)
+            .setKind(KIND2)
+            .setFilter(ancestorAndFilter)
+            .setLimit(1)
+            .build();
+    QueryResults results4 = DATASTORE.run(orQueryNested2);
+    assertTrue(results4.hasNext());
+    assertEquals(ENTITY2, results4.next());
+    assertFalse(results4.hasNext());
+  }
+
   @Test
   public void testNewTransactionCommit() {
     Transaction transaction = DATASTORE.newTransaction();
@@ -946,6 +1026,21 @@ public void testInNotInNeqFilters() throws InterruptedException {
     assertEquals(e2, resultNeq.next());
     assertFalse(resultNeq.hasNext());
 
+    Query scQueryInEqOr =
+        Query.newEntityQueryBuilder()
+            .setKind(KIND1)
+            .setFilter(
+                CompositeFilter.or(
+                    PropertyFilter.in("v_int", ListValue.of(10, 50000)),
+                    PropertyFilter.eq("v_int", 10000)))
+            .build();
+
+    QueryResults run = DATASTORE.run(scQueryInEqOr);
+
+    assertTrue(run.hasNext());
+    assertEquals(e1, run.next());
+    assertFalse(run.hasNext());
+
     DATASTORE.delete(e1.getKey());
     DATASTORE.delete(e2.getKey());
   }
diff --git a/grpc-google-cloud-datastore-admin-v1/pom.xml b/grpc-google-cloud-datastore-admin-v1/pom.xml
index 49fee5cf0..f92d982b4 100644
--- a/grpc-google-cloud-datastore-admin-v1/pom.xml
+++ b/grpc-google-cloud-datastore-admin-v1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-datastore-admin-v1
-  2.13.5
+  2.14.2
   grpc-google-cloud-datastore-admin-v1
   GRPC library for google-cloud-datastore
   
     com.google.cloud
     google-cloud-datastore-parent
-    2.13.5
+    2.14.2
   
   
     
diff --git a/grpc-google-cloud-datastore-admin-v1/src/main/java/com/google/datastore/admin/v1/DatastoreAdminGrpc.java b/grpc-google-cloud-datastore-admin-v1/src/main/java/com/google/datastore/admin/v1/DatastoreAdminGrpc.java
index 29fc8fcdc..59052f146 100644
--- a/grpc-google-cloud-datastore-admin-v1/src/main/java/com/google/datastore/admin/v1/DatastoreAdminGrpc.java
+++ b/grpc-google-cloud-datastore-admin-v1/src/main/java/com/google/datastore/admin/v1/DatastoreAdminGrpc.java
@@ -421,7 +421,7 @@ public DatastoreAdminFutureStub newStub(
    * but are accessed via service google.longrunning.Operations.
    * 
*/ - public abstract static class DatastoreAdminImplBase implements io.grpc.BindableService { + public interface AsyncService { /** * @@ -437,7 +437,7 @@ public abstract static class DatastoreAdminImplBase implements io.grpc.BindableS * Cloud Storage. * */ - public void exportEntities( + default void exportEntities( com.google.datastore.admin.v1.ExportEntitiesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( @@ -455,7 +455,7 @@ public void exportEntities( * that a subset of the data has already been imported to Cloud Datastore. * */ - public void importEntities( + default void importEntities( com.google.datastore.admin.v1.ImportEntitiesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( @@ -480,7 +480,7 @@ public void importEntities( * Indexes with a single property cannot be created. * */ - public void createIndex( + default void createIndex( com.google.datastore.admin.v1.CreateIndexRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( @@ -502,7 +502,7 @@ public void createIndex( * [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again. * */ - public void deleteIndex( + default void deleteIndex( com.google.datastore.admin.v1.DeleteIndexRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( @@ -516,7 +516,7 @@ public void deleteIndex( * Gets an index. * */ - public void getIndex( + default void getIndex( com.google.datastore.admin.v1.GetIndexRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIndexMethod(), responseObserver); @@ -531,60 +531,72 @@ public void getIndex( * occasionally return stale results. * */ - public void listIndexes( + default void listIndexes( com.google.datastore.admin.v1.ListIndexesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListIndexesMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service DatastoreAdmin. + * + *
+   * Google Cloud Datastore Admin API
+   * The Datastore Admin API provides several admin services for Cloud Datastore.
+   * -----------------------------------------------------------------------------
+   * ## Concepts
+   * Project, namespace, kind, and entity as defined in the Google Cloud Datastore
+   * API.
+   * Operation: An Operation represents work being performed in the background.
+   * EntityFilter: Allows specifying a subset of entities in a project. This is
+   * specified as a combination of kinds and namespaces (either or both of which
+   * may be all).
+   * -----------------------------------------------------------------------------
+   * ## Services
+   * # Export/Import
+   * The Export/Import service provides the ability to copy all or a subset of
+   * entities to/from Google Cloud Storage.
+   * Exported data may be imported into Cloud Datastore for any Google Cloud
+   * Platform project. It is not restricted to the export source project. It is
+   * possible to export from one project and then import into another.
+   * Exported data can also be loaded into Google BigQuery for analysis.
+   * Exports and imports are performed asynchronously. An Operation resource is
+   * created for each export/import. The state (including any errors encountered)
+   * of the export/import may be queried via the Operation resource.
+   * # Index
+   * The index service manages Cloud Datastore composite indexes.
+   * Index creation and deletion are 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.
+   * # Operation
+   * 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 not yet done may be cancelled. The request to cancel is
+   * asynchronous and the operation may continue to run for some time after the
+   * request to cancel is made.
+   * An operation that is done may be deleted so that it is no longer listed as
+   * part of the Operation collection.
+   * ListOperations returns all pending operations, but not completed operations.
+   * Operations are created by service DatastoreAdmin,
+   * but are accessed via service google.longrunning.Operations.
+   * 
+ */ + public abstract static class DatastoreAdminImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getExportEntitiesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.admin.v1.ExportEntitiesRequest, - com.google.longrunning.Operation>(this, METHODID_EXPORT_ENTITIES))) - .addMethod( - getImportEntitiesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.admin.v1.ImportEntitiesRequest, - com.google.longrunning.Operation>(this, METHODID_IMPORT_ENTITIES))) - .addMethod( - getCreateIndexMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.admin.v1.CreateIndexRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_INDEX))) - .addMethod( - getDeleteIndexMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.admin.v1.DeleteIndexRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_INDEX))) - .addMethod( - getGetIndexMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.admin.v1.GetIndexRequest, - com.google.datastore.admin.v1.Index>(this, METHODID_GET_INDEX))) - .addMethod( - getListIndexesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.admin.v1.ListIndexesRequest, - com.google.datastore.admin.v1.ListIndexesResponse>( - this, METHODID_LIST_INDEXES))) - .build(); + return DatastoreAdminGrpc.bindService(this); } } /** - * + * A stub to allow clients to do asynchronous rpc calls to service DatastoreAdmin. * *
    * Google Cloud Datastore Admin API
@@ -769,7 +781,7 @@ public void listIndexes(
   }
 
   /**
-   *
+   * A stub to allow clients to do synchronous rpc calls to service DatastoreAdmin.
    *
    * 
    * Google Cloud Datastore Admin API
@@ -938,7 +950,7 @@ public com.google.datastore.admin.v1.ListIndexesResponse listIndexes(
   }
 
   /**
-   *
+   * A stub to allow clients to do ListenableFuture-style rpc calls to service DatastoreAdmin.
    *
    * 
    * Google Cloud Datastore Admin API
@@ -1119,10 +1131,10 @@ private static final class MethodHandlers
           io.grpc.stub.ServerCalls.ServerStreamingMethod,
           io.grpc.stub.ServerCalls.ClientStreamingMethod,
           io.grpc.stub.ServerCalls.BidiStreamingMethod {
-    private final DatastoreAdminImplBase serviceImpl;
+    private final AsyncService serviceImpl;
     private final int methodId;
 
-    MethodHandlers(DatastoreAdminImplBase serviceImpl, int methodId) {
+    MethodHandlers(AsyncService serviceImpl, int methodId) {
       this.serviceImpl = serviceImpl;
       this.methodId = methodId;
     }
@@ -1178,6 +1190,48 @@ public io.grpc.stub.StreamObserver invoke(
     }
   }
 
+  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+        .addMethod(
+            getExportEntitiesMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.datastore.admin.v1.ExportEntitiesRequest,
+                    com.google.longrunning.Operation>(service, METHODID_EXPORT_ENTITIES)))
+        .addMethod(
+            getImportEntitiesMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.datastore.admin.v1.ImportEntitiesRequest,
+                    com.google.longrunning.Operation>(service, METHODID_IMPORT_ENTITIES)))
+        .addMethod(
+            getCreateIndexMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.datastore.admin.v1.CreateIndexRequest,
+                    com.google.longrunning.Operation>(service, METHODID_CREATE_INDEX)))
+        .addMethod(
+            getDeleteIndexMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.datastore.admin.v1.DeleteIndexRequest,
+                    com.google.longrunning.Operation>(service, METHODID_DELETE_INDEX)))
+        .addMethod(
+            getGetIndexMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.datastore.admin.v1.GetIndexRequest,
+                    com.google.datastore.admin.v1.Index>(service, METHODID_GET_INDEX)))
+        .addMethod(
+            getListIndexesMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.datastore.admin.v1.ListIndexesRequest,
+                    com.google.datastore.admin.v1.ListIndexesResponse>(
+                    service, METHODID_LIST_INDEXES)))
+        .build();
+  }
+
   private abstract static class DatastoreAdminBaseDescriptorSupplier
       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
diff --git a/pom.xml b/pom.xml
index 5183f87e4..eabf1c94a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   com.google.cloud
   google-cloud-datastore-parent
   pom
-  2.13.5
+  2.14.2
   Google Cloud Datastore Parent
   https://github.com/googleapis/java-datastore
   
@@ -151,7 +151,7 @@
       
         com.google.cloud
         google-cloud-shared-dependencies
-        3.3.0
+        3.6.0
         pom
         import
       
@@ -159,27 +159,27 @@
       
         com.google.api.grpc
         proto-google-cloud-datastore-admin-v1
-        2.13.5
+        2.14.2
       
       
         com.google.api.grpc
         grpc-google-cloud-datastore-admin-v1
-        2.13.5
+        2.14.2
       
       
         com.google.cloud
         google-cloud-datastore
-        2.13.5
+        2.14.2
       
       
         com.google.api.grpc
         proto-google-cloud-datastore-v1
-        0.104.5
+        0.105.2
       
       
         com.google.cloud.datastore
         datastore-v1-proto-client
-        2.13.5
+        2.14.2
         
           
             com.google.api.grpc
@@ -232,7 +232,7 @@
           
             org.apache.maven.plugins
             maven-compiler-plugin
-            3.10.1
+            3.11.0
             
               UTF-8
               true
diff --git a/proto-google-cloud-datastore-admin-v1/pom.xml b/proto-google-cloud-datastore-admin-v1/pom.xml
index 0df47ea36..5a13251a4 100644
--- a/proto-google-cloud-datastore-admin-v1/pom.xml
+++ b/proto-google-cloud-datastore-admin-v1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   proto-google-cloud-datastore-admin-v1
-  2.13.5
+  2.14.2
   proto-google-cloud-datastore-admin-v1
   Proto library for google-cloud-datastore
   
     com.google.cloud
     google-cloud-datastore-parent
-    2.13.5
+    2.14.2
   
   
     
diff --git a/proto-google-cloud-datastore-v1/pom.xml b/proto-google-cloud-datastore-v1/pom.xml
index 5595c4c45..33adffc1f 100644
--- a/proto-google-cloud-datastore-v1/pom.xml
+++ b/proto-google-cloud-datastore-v1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   proto-google-cloud-datastore-v1
-  0.104.5
+  0.105.2
   proto-google-cloud-datastore-v1
   PROTO library for proto-google-cloud-datastore-v1
   
     com.google.cloud
     google-cloud-datastore-parent
-    2.13.5
+    2.14.2
   
   
     
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/AggregationQuery.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/AggregationQuery.java
index 91aa55f7d..5311d1a45 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/AggregationQuery.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/AggregationQuery.java
@@ -121,7 +121,7 @@ public interface AggregationOrBuilder
      *   COUNT_UP_TO(1) AS count_up_to_1,
      *   COUNT_UP_TO(2),
      *   COUNT_UP_TO(3) AS count_up_to_3,
-     *   COUNT_UP_TO(4)
+     *   COUNT(*)
      * OVER (
      *   ...
      * );
@@ -132,7 +132,7 @@ public interface AggregationOrBuilder
      *   COUNT_UP_TO(1) AS count_up_to_1,
      *   COUNT_UP_TO(2) AS property_1,
      *   COUNT_UP_TO(3) AS count_up_to_3,
-     *   COUNT_UP_TO(4) AS property_2
+     *   COUNT(*) AS property_2
      * OVER (
      *   ...
      * );
@@ -161,7 +161,7 @@ public interface AggregationOrBuilder
      *   COUNT_UP_TO(1) AS count_up_to_1,
      *   COUNT_UP_TO(2),
      *   COUNT_UP_TO(3) AS count_up_to_3,
-     *   COUNT_UP_TO(4)
+     *   COUNT(*)
      * OVER (
      *   ...
      * );
@@ -172,7 +172,7 @@ public interface AggregationOrBuilder
      *   COUNT_UP_TO(1) AS count_up_to_1,
      *   COUNT_UP_TO(2) AS property_1,
      *   COUNT_UP_TO(3) AS count_up_to_3,
-     *   COUNT_UP_TO(4) AS property_2
+     *   COUNT(*) AS property_2
      * OVER (
      *   ...
      * );
@@ -195,7 +195,7 @@ public interface AggregationOrBuilder
    *
    *
    * 
-   * Defines a aggregation that produces a single result.
+   * Defines an aggregation that produces a single result.
    * 
* * Protobuf type {@code google.datastore.v1.AggregationQuery.Aggregation} @@ -252,7 +252,7 @@ public interface CountOrBuilder * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -277,7 +277,7 @@ public interface CountOrBuilder * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -302,7 +302,7 @@ public interface CountOrBuilder * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -377,7 +377,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -405,7 +405,7 @@ public boolean hasUpTo() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -433,7 +433,7 @@ public com.google.protobuf.Int64Value getUpTo() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -825,7 +825,7 @@ public Builder mergeFrom( * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -852,7 +852,7 @@ public boolean hasUpTo() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -883,7 +883,7 @@ public com.google.protobuf.Int64Value getUpTo() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -918,7 +918,7 @@ public Builder setUpTo(com.google.protobuf.Int64Value value) { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -950,7 +950,7 @@ public Builder setUpTo(com.google.protobuf.Int64Value.Builder builderForValue) { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -988,7 +988,7 @@ public Builder mergeUpTo(com.google.protobuf.Int64Value value) { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -1020,7 +1020,7 @@ public Builder clearUpTo() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -1047,7 +1047,7 @@ public com.google.protobuf.Int64Value.Builder getUpToBuilder() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -1076,7 +1076,7 @@ public com.google.protobuf.Int64ValueOrBuilder getUpToOrBuilder() { * Optional. Optional constraint on the maximum number of entities to * count. * This provides a way to set an upper bound on the number of entities - * to scan, limiting latency and cost. + * to scan, limiting latency, and cost. * Unspecified is interpreted as no bound. * If a zero value is provided, a count result of zero should always be * expected. @@ -1287,7 +1287,7 @@ public com.google.datastore.v1.AggregationQuery.Aggregation.CountOrBuilder getCo * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2), * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) + * COUNT(*) * OVER ( * ... * ); @@ -1298,7 +1298,7 @@ public com.google.datastore.v1.AggregationQuery.Aggregation.CountOrBuilder getCo * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2) AS property_1, * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS property_2 + * COUNT(*) AS property_2 * OVER ( * ... * ); @@ -1338,7 +1338,7 @@ public java.lang.String getAlias() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2), * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) + * COUNT(*) * OVER ( * ... * ); @@ -1349,7 +1349,7 @@ public java.lang.String getAlias() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2) AS property_1, * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS property_2 + * COUNT(*) AS property_2 * OVER ( * ... * ); @@ -1567,7 +1567,7 @@ protected Builder newBuilderForType( * * *
-     * Defines a aggregation that produces a single result.
+     * Defines an aggregation that produces a single result.
      * 
* * Protobuf type {@code google.datastore.v1.AggregationQuery.Aggregation} @@ -2021,7 +2021,7 @@ public com.google.datastore.v1.AggregationQuery.Aggregation.Count.Builder getCou * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2), * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) + * COUNT(*) * OVER ( * ... * ); @@ -2032,7 +2032,7 @@ public com.google.datastore.v1.AggregationQuery.Aggregation.Count.Builder getCou * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2) AS property_1, * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS property_2 + * COUNT(*) AS property_2 * OVER ( * ... * ); @@ -2071,7 +2071,7 @@ public java.lang.String getAlias() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2), * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) + * COUNT(*) * OVER ( * ... * ); @@ -2082,7 +2082,7 @@ public java.lang.String getAlias() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2) AS property_1, * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS property_2 + * COUNT(*) AS property_2 * OVER ( * ... * ); @@ -2121,7 +2121,7 @@ public com.google.protobuf.ByteString getAliasBytes() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2), * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) + * COUNT(*) * OVER ( * ... * ); @@ -2132,7 +2132,7 @@ public com.google.protobuf.ByteString getAliasBytes() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2) AS property_1, * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS property_2 + * COUNT(*) AS property_2 * OVER ( * ... * ); @@ -2170,7 +2170,7 @@ public Builder setAlias(java.lang.String value) { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2), * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) + * COUNT(*) * OVER ( * ... * ); @@ -2181,7 +2181,7 @@ public Builder setAlias(java.lang.String value) { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2) AS property_1, * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS property_2 + * COUNT(*) AS property_2 * OVER ( * ... * ); @@ -2215,7 +2215,7 @@ public Builder clearAlias() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2), * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) + * COUNT(*) * OVER ( * ... * ); @@ -2226,7 +2226,7 @@ public Builder clearAlias() { * COUNT_UP_TO(1) AS count_up_to_1, * COUNT_UP_TO(2) AS property_1, * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS property_2 + * COUNT(*) AS property_2 * OVER ( * ... * ); diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Entity.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Entity.java index 39432e877..d6f7c3c6a 100644 --- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Entity.java +++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Entity.java @@ -173,8 +173,8 @@ public int getPropertiesCount() { * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. *
* * map<string, .google.datastore.v1.Value> properties = 3; @@ -200,8 +200,8 @@ public java.util.Map getPropert * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. *
* * map<string, .google.datastore.v1.Value> properties = 3; @@ -218,8 +218,8 @@ public java.util.Map getPropert * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. *
* * map<string, .google.datastore.v1.Value> properties = 3; @@ -244,8 +244,8 @@ public java.util.Map getPropert * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -918,8 +918,8 @@ public int getPropertiesCount() { * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -945,8 +945,8 @@ public java.util.Map getPropert * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -963,8 +963,8 @@ public java.util.Map getPropert * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -989,8 +989,8 @@ public java.util.Map getPropert * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -1021,8 +1021,8 @@ public Builder clearProperties() { * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -1048,8 +1048,8 @@ public java.util.Map getMutable * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -1073,8 +1073,8 @@ public Builder putProperties(java.lang.String key, com.google.datastore.v1.Value * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityOrBuilder.java index 19f935612..d36510825 100644 --- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityOrBuilder.java +++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityOrBuilder.java @@ -78,8 +78,8 @@ public interface EntityOrBuilder * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -93,8 +93,8 @@ public interface EntityOrBuilder * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -111,8 +111,8 @@ public interface EntityOrBuilder * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -126,8 +126,8 @@ public interface EntityOrBuilder * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; @@ -145,8 +145,8 @@ com.google.datastore.v1.Value getPropertiesOrDefault( * The map's keys are property names. * A property name matching regex `__.*__` is reserved. * A reserved property name is forbidden in certain documented contexts. - * The name must not contain more than 500 characters. - * The name cannot be `""`. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + * be empty. * * * map<string, .google.datastore.v1.Value> properties = 3; diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java index 475a26177..2b23df9f8 100644 --- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java +++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java @@ -345,6 +345,9 @@ public com.google.datastore.v1.PropertyOrderOrBuilder getOrderOrBuilder(int inde * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -360,6 +363,9 @@ public java.util.List getDistinctOnLi * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -376,6 +382,9 @@ public java.util.List getDistinctOnLi * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -391,6 +400,9 @@ public int getDistinctOnCount() { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -406,6 +418,9 @@ public com.google.datastore.v1.PropertyReference getDistinctOn(int index) { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2509,6 +2524,9 @@ private void ensureDistinctOnIsMutable() { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2527,6 +2545,9 @@ public java.util.List getDistinctOnLi * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2545,6 +2566,9 @@ public int getDistinctOnCount() { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2563,6 +2587,9 @@ public com.google.datastore.v1.PropertyReference getDistinctOn(int index) { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2587,6 +2614,9 @@ public Builder setDistinctOn(int index, com.google.datastore.v1.PropertyReferenc * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2609,6 +2639,9 @@ public Builder setDistinctOn( * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2633,6 +2666,9 @@ public Builder addDistinctOn(com.google.datastore.v1.PropertyReference value) { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2657,6 +2693,9 @@ public Builder addDistinctOn(int index, com.google.datastore.v1.PropertyReferenc * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2679,6 +2718,9 @@ public Builder addDistinctOn( * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2701,6 +2743,9 @@ public Builder addDistinctOn( * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2723,6 +2768,9 @@ public Builder addAllDistinctOn( * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2744,6 +2792,9 @@ public Builder clearDistinctOn() { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2765,6 +2816,9 @@ public Builder removeDistinctOn(int index) { * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2779,6 +2833,9 @@ public com.google.datastore.v1.PropertyReference.Builder getDistinctOnBuilder(in * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2797,6 +2854,9 @@ public com.google.datastore.v1.PropertyReferenceOrBuilder getDistinctOnOrBuilder * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2816,6 +2876,9 @@ public com.google.datastore.v1.PropertyReferenceOrBuilder getDistinctOnOrBuilder * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2831,6 +2894,9 @@ public com.google.datastore.v1.PropertyReference.Builder addDistinctOnBuilder() * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -2846,6 +2912,9 @@ public com.google.datastore.v1.PropertyReference.Builder addDistinctOnBuilder(in * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java index f06b1b616..1b2009699 100644 --- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java +++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java @@ -224,6 +224,9 @@ public interface QueryOrBuilder * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -236,6 +239,9 @@ public interface QueryOrBuilder * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -248,6 +254,9 @@ public interface QueryOrBuilder * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -260,6 +269,9 @@ public interface QueryOrBuilder * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; @@ -273,6 +285,9 @@ public interface QueryOrBuilder * The properties to make distinct. The query results will contain the first * result for each distinct combination of values for the given properties * (if empty, all results are returned). + * Requires: + * * If `order` is specified, the set of distinct on properties must appear + * before the non-distinct on properties in `order`. * * * repeated .google.datastore.v1.PropertyReference distinct_on = 6; diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto index bbb5989e5..91c521716 100644 --- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto +++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto index 2f9c71427..4822048b6 100644 --- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto +++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-datastore-v1/src/main/proto/google/datastore/v1/entity.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/entity.proto index ddf22e032..2d22853f5 100644 --- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/entity.proto +++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/entity.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -213,7 +213,7 @@ message Entity { // The map's keys are property names. // A property name matching regex `__.*__` is reserved. // A reserved property name is forbidden in certain documented contexts. - // The name must not contain more than 500 characters. - // The name cannot be `""`. + // The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot + // be empty. map properties = 3; } diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto index 169af8801..812bfbf05 100644 --- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto +++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -99,6 +99,11 @@ message Query { // The properties to make distinct. The query results will contain the first // result for each distinct combination of values for the given properties // (if empty, all results are returned). + // + // Requires: + // + // * If `order` is specified, the set of distinct on properties must appear + // before the non-distinct on properties in `order`. repeated PropertyReference distinct_on = 6; // A starting point for the query results. Query cursors are @@ -127,7 +132,7 @@ message Query { // Datastore query for running an aggregation over a // [Query][google.datastore.v1.Query]. message AggregationQuery { - // Defines a aggregation that produces a single result. + // Defines an aggregation that produces a single result. message Aggregation { // Count of entities that match the query. // @@ -138,7 +143,7 @@ message AggregationQuery { // count. // // This provides a way to set an upper bound on the number of entities - // to scan, limiting latency and cost. + // to scan, limiting latency, and cost. // // Unspecified is interpreted as no bound. // @@ -175,7 +180,7 @@ message AggregationQuery { // COUNT_UP_TO(1) AS count_up_to_1, // COUNT_UP_TO(2), // COUNT_UP_TO(3) AS count_up_to_3, - // COUNT_UP_TO(4) + // COUNT(*) // OVER ( // ... // ); @@ -188,7 +193,7 @@ message AggregationQuery { // COUNT_UP_TO(1) AS count_up_to_1, // COUNT_UP_TO(2) AS property_1, // COUNT_UP_TO(3) AS count_up_to_3, - // COUNT_UP_TO(4) AS property_2 + // COUNT(*) AS property_2 // OVER ( // ... // ); diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 46a6c52a3..a6e7d8d9d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-datastore - 2.13.4 + 2.14.1 diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 58c466445..f8dd32fe8 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -28,7 +28,7 @@ com.google.cloud libraries-bom - 26.8.0 + 26.11.0 pom import @@ -97,7 +97,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.0.0 **/IT* diff --git a/samples/pom.xml b/samples/pom.xml index 7d846eb1b..a24801164 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -39,7 +39,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.0 + 3.1.1 true diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 7ab5a9f74..71b11d7ec 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-datastore - 2.13.4 + 2.14.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 3497fa5c3..637698e64 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.8.0 + 26.11.0 pom import diff --git a/samples/snippets/src/main/java/com/example/datastore/filters/OrFilterQuery.java b/samples/snippets/src/main/java/com/example/datastore/filters/OrFilterQuery.java new file mode 100644 index 000000000..1fa1d40de --- /dev/null +++ b/samples/snippets/src/main/java/com/example/datastore/filters/OrFilterQuery.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 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.example.datastore.filters; + +// sample-metadata: +// title: Create a union between two filters +// description: Create a union between two filters (logical OR operator) + +// [START datastore_query_filter_or] +import com.google.cloud.datastore.Datastore; +import com.google.cloud.datastore.DatastoreOptions; +import com.google.cloud.datastore.Entity; +import com.google.cloud.datastore.Query; +import com.google.cloud.datastore.QueryResults; +import com.google.cloud.datastore.StructuredQuery.CompositeFilter; +import com.google.cloud.datastore.StructuredQuery.Filter; +import com.google.cloud.datastore.StructuredQuery.PropertyFilter; + +public class OrFilterQuery { + public static void invoke() throws Exception { + + // Instantiates a client + Datastore datastore = DatastoreOptions.getDefaultInstance().getService(); + String propertyName = "description"; + + // Create the two filters + Filter orFilter = + CompositeFilter.or( + PropertyFilter.eq(propertyName, "Feed cats"), + PropertyFilter.eq(propertyName, "Buy milk")); + + // Build the query + Query query = Query.newEntityQueryBuilder().setKind("Task").setFilter(orFilter).build(); + + // Get the results back from Datastore + QueryResults results = datastore.run(query); + + if (!results.hasNext()) { + throw new Exception("query yielded no results"); + } + + while (results.hasNext()) { + Entity entity = results.next(); + System.out.printf("Entity: %s%n", entity); + } + } +} +// [END datastore_query_filter_or] diff --git a/samples/snippets/src/test/java/com/example/datastore/OrFilterQuerySampleIT.java b/samples/snippets/src/test/java/com/example/datastore/OrFilterQuerySampleIT.java new file mode 100644 index 000000000..7e6cc8fa8 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/datastore/OrFilterQuerySampleIT.java @@ -0,0 +1,70 @@ +/* + * Copyright 2023 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.example.datastore; + +import com.example.datastore.filters.OrFilterQuery; +import com.google.cloud.datastore.Datastore; +import com.google.cloud.datastore.DatastoreOptions; +import com.google.cloud.datastore.Entity; +import com.google.cloud.datastore.Key; +import com.rule.SystemsOutRule; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +@SuppressWarnings("checkstyle:abbreviationaswordinname") +public class OrFilterQuerySampleIT { + + private final Datastore datastore = DatastoreOptions.getDefaultInstance().getService(); + private final String fieldName = "description"; + + private Key taskKey1; + private Key taskKey2; + + @Rule public final SystemsOutRule systemsOutRule = new SystemsOutRule(); + + @Before + public void setUp() { + taskKey1 = datastore.newKeyFactory().setKind("Task").newKey("sampleTask"); + Entity task1 = Entity.newBuilder(taskKey1).set(fieldName, "Buy milk").build(); + + taskKey2 = datastore.newKeyFactory().setKind("Task").newKey("sampleTask2"); + Entity task2 = Entity.newBuilder(taskKey2).set(fieldName, "Feed cats").build(); + + datastore.put(task1); + datastore.put(task2); + } + + @After + public void tearDown() { + datastore.delete(taskKey1); + datastore.delete(taskKey2); + } + + @Test + public void testOrFilterQuery() throws Exception { + // Act + OrFilterQuery.invoke(); + + // Assert + systemsOutRule.assertContains("Entity"); + } +} diff --git a/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java b/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java index 4013dbe04..1397728ba 100644 --- a/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java +++ b/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java @@ -34,6 +34,7 @@ import com.google.cloud.datastore.IncompleteKey; import com.google.cloud.datastore.Key; import com.google.cloud.datastore.KeyFactory; +import com.google.cloud.datastore.KeyQuery; import com.google.cloud.datastore.ListValue; import com.google.cloud.datastore.PathElement; import com.google.cloud.datastore.ProjectionEntity; @@ -65,7 +66,9 @@ import java.util.List; import java.util.Map; import java.util.TimeZone; +import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -129,6 +132,13 @@ public void setUp() { datastoreRealBackend = DatastoreOptions.getDefaultInstance().getService(); } + @After + public void tearDown() throws Exception { + KeyQuery taskQuery = Query.newKeyQueryBuilder().setKind("Task").build(); + Key[] taskKeysToDelete = Iterators.toArray(datastoreRealBackend.run(taskQuery), Key.class); + datastoreRealBackend.delete(taskKeysToDelete); + } + /** * Stops the local Datastore emulator. * @@ -1147,8 +1157,10 @@ public void testInQuerySorted() { } @Test - public void testStaleReads() { + public void testStaleReads() throws InterruptedException { setUpQueryTestsRealBackend(); + // waiting for 6 seconds, so that we can query with read time of 5 seconds ago + TimeUnit.SECONDS.sleep(6); Datastore datastoreClient = datastoreRealBackend; // [START datastore_stale_read] Key taskKey = @@ -1158,10 +1170,10 @@ public void testStaleReads() { .addAncestors(PathElement.of("TaskList", "default")) .newKey("someTask"); - Timestamp fifteenSecondsAgo = - Timestamp.ofTimeSecondsAndNanos(Timestamp.now().getSeconds() - 15L, 0); - // Create a readOption with read time fifteenSecondsAgo - ReadOption readOption = ReadOption.readTime(fifteenSecondsAgo); + Timestamp fiveSecondsAgo = + Timestamp.ofTimeSecondsAndNanos(Timestamp.now().getSeconds() - 5L, 0); + // Create a readOption with read time fiveSecondsAgo + ReadOption readOption = ReadOption.readTime(fiveSecondsAgo); // Use the readOption to Fetch entity Entity entity = datastoreClient.get(taskKey, readOption); diff --git a/versions.txt b/versions.txt index 45de4563e..3f355a15f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,9 +1,9 @@ # Format: # module:released-version:current-version -google-cloud-datastore:2.13.5:2.13.5 -google-cloud-datastore-bom:2.13.5:2.13.5 -proto-google-cloud-datastore-v1:0.104.5:0.104.5 -datastore-v1-proto-client:2.13.5:2.13.5 -proto-google-cloud-datastore-admin-v1:2.13.5:2.13.5 -grpc-google-cloud-datastore-admin-v1:2.13.5:2.13.5 +google-cloud-datastore:2.14.2:2.14.2 +google-cloud-datastore-bom:2.14.2:2.14.2 +proto-google-cloud-datastore-v1:0.105.2:0.105.2 +datastore-v1-proto-client:2.14.2:2.14.2 +proto-google-cloud-datastore-admin-v1:2.14.2:2.14.2 +grpc-google-cloud-datastore-admin-v1:2.14.2:2.14.2