diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index 85ad9f9adf..0d9259a24b 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.0" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.2" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index b80b30fdb3..7534b590b2 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.0" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.2" } env_vars: { diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ed4ef9200..2d608a5dfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [3.11.0](https://github.com/googleapis/java-firestore/compare/v3.10.0...v3.11.0) (2023-05-12) + + +### Features + +* Add bloom filter related proto fields ([#1285](https://github.com/googleapis/java-firestore/issues/1285)) ([9b14c1b](https://github.com/googleapis/java-firestore/commit/9b14c1b69ca5a70cd92feaa41a520e732c0b3cee)) + + +### Dependencies + +* Update beam.version to v2.47.0 ([#1292](https://github.com/googleapis/java-firestore/issues/1292)) ([e9f11e8](https://github.com/googleapis/java-firestore/commit/e9f11e86aafaa4a50cca789c7349ac59c4c63ccb)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.9.0 ([#1291](https://github.com/googleapis/java-firestore/issues/1291)) ([6dd0e8f](https://github.com/googleapis/java-firestore/commit/6dd0e8fe93cd1f18a949ffd98a247d7364d9f475)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.22 ([#1293](https://github.com/googleapis/java-firestore/issues/1293)) ([e8e5f9b](https://github.com/googleapis/java-firestore/commit/e8e5f9b056c94d68c01b90bf49b1d6908b511ab5)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.22 ([#1294](https://github.com/googleapis/java-firestore/issues/1294)) ([f0ceb7f](https://github.com/googleapis/java-firestore/commit/f0ceb7fc076e43eb62c1a75fa620ee3e510739f4)) + ## [3.10.0](https://github.com/googleapis/java-firestore/compare/v3.9.6...v3.10.0) (2023-04-27) diff --git a/README.md b/README.md index 1482907b30..1febde1934 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.13.0 + 26.14.0 pom import @@ -42,7 +42,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-firestore - 3.9.6 + 3.10.0 ``` @@ -50,20 +50,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.13.0') +implementation platform('com.google.cloud:libraries-bom:26.14.0') implementation 'com.google.cloud:google-cloud-firestore' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-firestore:3.9.6' +implementation 'com.google.cloud:google-cloud-firestore:3.10.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.9.6" +libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.10.0" ``` @@ -222,7 +222,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-firestore/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-firestore.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.9.6 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.10.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/google-cloud-firestore-admin/pom.xml b/google-cloud-firestore-admin/pom.xml index 5c76d3e16f..919c4a6ea0 100644 --- a/google-cloud-firestore-admin/pom.xml +++ b/google-cloud-firestore-admin/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-firestore-admin - 3.10.0 + 3.11.0 jar Google Cloud Firestore Admin Client https://github.com/googleapis/java-firestore @@ -14,7 +14,7 @@ com.google.cloud google-cloud-firestore-parent - 3.10.0 + 3.11.0 diff --git a/google-cloud-firestore-bom/pom.xml b/google-cloud-firestore-bom/pom.xml index c0441bc14d..ff8b6ca40b 100644 --- a/google-cloud-firestore-bom/pom.xml +++ b/google-cloud-firestore-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-firestore-bom - 3.10.0 + 3.11.0 pom com.google.cloud @@ -52,37 +52,37 @@ com.google.cloud google-cloud-firestore - 3.10.0 + 3.11.0 com.google.cloud google-cloud-firestore-admin - 3.10.0 + 3.11.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.10.0 + 3.11.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.10.0 + 3.11.0 com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.10.0 + 3.11.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.10.0 + 3.11.0 com.google.cloud proto-google-cloud-firestore-bundle-v1 - 3.10.0 + 3.11.0 diff --git a/google-cloud-firestore/pom.xml b/google-cloud-firestore/pom.xml index 1e7fe41035..11889ad64a 100644 --- a/google-cloud-firestore/pom.xml +++ b/google-cloud-firestore/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-firestore - 3.10.0 + 3.11.0 jar Google Cloud Firestore https://github.com/googleapis/java-firestore @@ -12,7 +12,7 @@ com.google.cloud google-cloud-firestore-parent - 3.10.0 + 3.11.0 google-cloud-firestore @@ -162,7 +162,7 @@ com.google.cloud google-cloud-conformance-tests - 0.3.5 + 0.3.6 test diff --git a/grpc-google-cloud-firestore-admin-v1/pom.xml b/grpc-google-cloud-firestore-admin-v1/pom.xml index 97376be56a..b0801186b5 100644 --- a/grpc-google-cloud-firestore-admin-v1/pom.xml +++ b/grpc-google-cloud-firestore-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.10.0 + 3.11.0 grpc-google-cloud-firestore-admin-v1 GRPC library for grpc-google-cloud-firestore-admin-v1 com.google.cloud google-cloud-firestore-parent - 3.10.0 + 3.11.0 diff --git a/grpc-google-cloud-firestore-v1/pom.xml b/grpc-google-cloud-firestore-v1/pom.xml index 8678b278c3..5e78103306 100644 --- a/grpc-google-cloud-firestore-v1/pom.xml +++ b/grpc-google-cloud-firestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.10.0 + 3.11.0 grpc-google-cloud-firestore-v1 GRPC library for grpc-google-cloud-firestore-v1 com.google.cloud google-cloud-firestore-parent - 3.10.0 + 3.11.0 diff --git a/pom.xml b/pom.xml index 4160e327a3..099f05220c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-firestore-parent pom - 3.10.0 + 3.11.0 Google Cloud Firestore Parent https://github.com/googleapis/java-firestore @@ -150,38 +150,38 @@ com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.10.0 + 3.11.0 com.google.cloud google-cloud-firestore - 3.10.0 + 3.11.0 com.google.cloud proto-google-cloud-firestore-bundle-v1 - 3.10.0 + 3.11.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.10.0 + 3.11.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.10.0 + 3.11.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.10.0 + 3.11.0 com.google.cloud google-cloud-shared-dependencies - 3.8.0 + 3.9.0 pom import diff --git a/proto-google-cloud-firestore-admin-v1/pom.xml b/proto-google-cloud-firestore-admin-v1/pom.xml index dab76db4dd..c951ad938a 100644 --- a/proto-google-cloud-firestore-admin-v1/pom.xml +++ b/proto-google-cloud-firestore-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.10.0 + 3.11.0 proto-google-cloud-firestore-admin-v1 PROTO library for proto-google-cloud-firestore-admin-v1 com.google.cloud google-cloud-firestore-parent - 3.10.0 + 3.11.0 diff --git a/proto-google-cloud-firestore-bundle-v1/pom.xml b/proto-google-cloud-firestore-bundle-v1/pom.xml index 70cd42e4c6..1fc2c9dc30 100644 --- a/proto-google-cloud-firestore-bundle-v1/pom.xml +++ b/proto-google-cloud-firestore-bundle-v1/pom.xml @@ -5,14 +5,14 @@ 4.0.0 proto-google-cloud-firestore-bundle-v1 - 3.10.0 + 3.11.0 proto-google-cloud-firestore-bundle-v1 PROTO library for proto-google-cloud-firestore-bundle-v1 com.google.cloud google-cloud-firestore-parent - 3.10.0 + 3.11.0 diff --git a/proto-google-cloud-firestore-v1/pom.xml b/proto-google-cloud-firestore-v1/pom.xml index 1046f13f98..3d21ecee43 100644 --- a/proto-google-cloud-firestore-v1/pom.xml +++ b/proto-google-cloud-firestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.10.0 + 3.11.0 proto-google-cloud-firestore-v1 PROTO library for proto-google-cloud-firestore-v1 com.google.cloud google-cloud-firestore-parent - 3.10.0 + 3.11.0 diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequence.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequence.java new file mode 100644 index 0000000000..17f21007b3 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequence.java @@ -0,0 +1,666 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/bloom_filter.proto + +package com.google.firestore.v1; + +/** + * + * + *
+ * A sequence of bits, encoded in a byte array.
+ * Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only
+ * exception is the last byte, which may store 8 _or fewer_ bits. The `padding`
+ * defines the number of bits of the last byte to be ignored as "padding". The
+ * values of these "padding" bits are unspecified and must be ignored.
+ * To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`.
+ * To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`.
+ * To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`.
+ * To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`.
+ * To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`.
+ * The "size" of a `BitSequence` (the number of bits it contains) is calculated
+ * by this formula: `(bitmap.length * 8) - padding`.
+ * 
+ * + * Protobuf type {@code google.firestore.v1.BitSequence} + */ +public final class BitSequence extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BitSequence) + BitSequenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use BitSequence.newBuilder() to construct. + private BitSequence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BitSequence() { + bitmap_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BitSequence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BitSequence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BitSequence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BitSequence.class, + com.google.firestore.v1.BitSequence.Builder.class); + } + + public static final int BITMAP_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString bitmap_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * The bytes that encode the bit sequence.
+   * May have a length of zero.
+   * 
+ * + * bytes bitmap = 1; + * + * @return The bitmap. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBitmap() { + return bitmap_; + } + + public static final int PADDING_FIELD_NUMBER = 2; + private int padding_ = 0; + /** + * + * + *
+   * The number of bits of the last byte in `bitmap` to ignore as "padding".
+   * If the length of `bitmap` is zero, then this value must be `0`.
+   * Otherwise, this value must be between 0 and 7, inclusive.
+   * 
+ * + * int32 padding = 2; + * + * @return The padding. + */ + @java.lang.Override + public int getPadding() { + return padding_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!bitmap_.isEmpty()) { + output.writeBytes(1, bitmap_); + } + if (padding_ != 0) { + output.writeInt32(2, padding_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!bitmap_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, bitmap_); + } + if (padding_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, padding_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.BitSequence)) { + return super.equals(obj); + } + com.google.firestore.v1.BitSequence other = (com.google.firestore.v1.BitSequence) obj; + + if (!getBitmap().equals(other.getBitmap())) return false; + if (getPadding() != other.getPadding()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BITMAP_FIELD_NUMBER; + hash = (53 * hash) + getBitmap().hashCode(); + hash = (37 * hash) + PADDING_FIELD_NUMBER; + hash = (53 * hash) + getPadding(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.BitSequence parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BitSequence parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BitSequence parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BitSequence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BitSequence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BitSequence parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BitSequence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BitSequence parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BitSequence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BitSequence parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BitSequence parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BitSequence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.BitSequence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A sequence of bits, encoded in a byte array.
+   * Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only
+   * exception is the last byte, which may store 8 _or fewer_ bits. The `padding`
+   * defines the number of bits of the last byte to be ignored as "padding". The
+   * values of these "padding" bits are unspecified and must be ignored.
+   * To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`.
+   * To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`.
+   * To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`.
+   * To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`.
+   * To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`.
+   * The "size" of a `BitSequence` (the number of bits it contains) is calculated
+   * by this formula: `(bitmap.length * 8) - padding`.
+   * 
+ * + * Protobuf type {@code google.firestore.v1.BitSequence} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.BitSequence) + com.google.firestore.v1.BitSequenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BitSequence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BitSequence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BitSequence.class, + com.google.firestore.v1.BitSequence.Builder.class); + } + + // Construct using com.google.firestore.v1.BitSequence.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitmap_ = com.google.protobuf.ByteString.EMPTY; + padding_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BitSequence_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.BitSequence getDefaultInstanceForType() { + return com.google.firestore.v1.BitSequence.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.BitSequence build() { + com.google.firestore.v1.BitSequence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.BitSequence buildPartial() { + com.google.firestore.v1.BitSequence result = new com.google.firestore.v1.BitSequence(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.v1.BitSequence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bitmap_ = bitmap_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.padding_ = padding_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.BitSequence) { + return mergeFrom((com.google.firestore.v1.BitSequence) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.BitSequence other) { + if (other == com.google.firestore.v1.BitSequence.getDefaultInstance()) return this; + if (other.getBitmap() != com.google.protobuf.ByteString.EMPTY) { + setBitmap(other.getBitmap()); + } + if (other.getPadding() != 0) { + setPadding(other.getPadding()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + bitmap_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + padding_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString bitmap_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The bytes that encode the bit sequence.
+     * May have a length of zero.
+     * 
+ * + * bytes bitmap = 1; + * + * @return The bitmap. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBitmap() { + return bitmap_; + } + /** + * + * + *
+     * The bytes that encode the bit sequence.
+     * May have a length of zero.
+     * 
+ * + * bytes bitmap = 1; + * + * @param value The bitmap to set. + * @return This builder for chaining. + */ + public Builder setBitmap(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitmap_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The bytes that encode the bit sequence.
+     * May have a length of zero.
+     * 
+ * + * bytes bitmap = 1; + * + * @return This builder for chaining. + */ + public Builder clearBitmap() { + bitField0_ = (bitField0_ & ~0x00000001); + bitmap_ = getDefaultInstance().getBitmap(); + onChanged(); + return this; + } + + private int padding_; + /** + * + * + *
+     * The number of bits of the last byte in `bitmap` to ignore as "padding".
+     * If the length of `bitmap` is zero, then this value must be `0`.
+     * Otherwise, this value must be between 0 and 7, inclusive.
+     * 
+ * + * int32 padding = 2; + * + * @return The padding. + */ + @java.lang.Override + public int getPadding() { + return padding_; + } + /** + * + * + *
+     * The number of bits of the last byte in `bitmap` to ignore as "padding".
+     * If the length of `bitmap` is zero, then this value must be `0`.
+     * Otherwise, this value must be between 0 and 7, inclusive.
+     * 
+ * + * int32 padding = 2; + * + * @param value The padding to set. + * @return This builder for chaining. + */ + public Builder setPadding(int value) { + + padding_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of bits of the last byte in `bitmap` to ignore as "padding".
+     * If the length of `bitmap` is zero, then this value must be `0`.
+     * Otherwise, this value must be between 0 and 7, inclusive.
+     * 
+ * + * int32 padding = 2; + * + * @return This builder for chaining. + */ + public Builder clearPadding() { + bitField0_ = (bitField0_ & ~0x00000002); + padding_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.BitSequence) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.BitSequence) + private static final com.google.firestore.v1.BitSequence DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.BitSequence(); + } + + public static com.google.firestore.v1.BitSequence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BitSequence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.BitSequence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequenceOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequenceOrBuilder.java new file mode 100644 index 0000000000..09167ca65e --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BitSequenceOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/bloom_filter.proto + +package com.google.firestore.v1; + +public interface BitSequenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.BitSequence) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The bytes that encode the bit sequence.
+   * May have a length of zero.
+   * 
+ * + * bytes bitmap = 1; + * + * @return The bitmap. + */ + com.google.protobuf.ByteString getBitmap(); + + /** + * + * + *
+   * The number of bits of the last byte in `bitmap` to ignore as "padding".
+   * If the length of `bitmap` is zero, then this value must be `0`.
+   * Otherwise, this value must be between 0 and 7, inclusive.
+   * 
+ * + * int32 padding = 2; + * + * @return The padding. + */ + int getPadding(); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilter.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilter.java new file mode 100644 index 0000000000..c0dab791a0 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilter.java @@ -0,0 +1,807 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/bloom_filter.proto + +package com.google.firestore.v1; + +/** + * + * + *
+ * A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter).
+ * The bloom filter hashes the entries with MD5 and treats the resulting 128-bit
+ * hash as 2 distinct 64-bit hash values, interpreted as unsigned integers
+ * using 2's complement encoding.
+ * These two hash values, named `h1` and `h2`, are then used to compute the
+ * `hash_count` hash values using the formula, starting at `i=0`:
+ *     h(i) = h1 + (i * h2)
+ * These resulting values are then taken modulo the number of bits in the bloom
+ * filter to get the bits of the bloom filter to test for the given entry.
+ * 
+ * + * Protobuf type {@code google.firestore.v1.BloomFilter} + */ +public final class BloomFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BloomFilter) + BloomFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use BloomFilter.newBuilder() to construct. + private BloomFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BloomFilter() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BloomFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BloomFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BloomFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BloomFilter.class, + com.google.firestore.v1.BloomFilter.Builder.class); + } + + public static final int BITS_FIELD_NUMBER = 1; + private com.google.firestore.v1.BitSequence bits_; + /** + * + * + *
+   * The bloom filter data.
+   * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + * + * @return Whether the bits field is set. + */ + @java.lang.Override + public boolean hasBits() { + return bits_ != null; + } + /** + * + * + *
+   * The bloom filter data.
+   * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + * + * @return The bits. + */ + @java.lang.Override + public com.google.firestore.v1.BitSequence getBits() { + return bits_ == null ? com.google.firestore.v1.BitSequence.getDefaultInstance() : bits_; + } + /** + * + * + *
+   * The bloom filter data.
+   * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + @java.lang.Override + public com.google.firestore.v1.BitSequenceOrBuilder getBitsOrBuilder() { + return bits_ == null ? com.google.firestore.v1.BitSequence.getDefaultInstance() : bits_; + } + + public static final int HASH_COUNT_FIELD_NUMBER = 2; + private int hashCount_ = 0; + /** + * + * + *
+   * The number of hashes used by the algorithm.
+   * 
+ * + * int32 hash_count = 2; + * + * @return The hashCount. + */ + @java.lang.Override + public int getHashCount() { + return hashCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (bits_ != null) { + output.writeMessage(1, getBits()); + } + if (hashCount_ != 0) { + output.writeInt32(2, hashCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bits_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBits()); + } + if (hashCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, hashCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.BloomFilter)) { + return super.equals(obj); + } + com.google.firestore.v1.BloomFilter other = (com.google.firestore.v1.BloomFilter) obj; + + if (hasBits() != other.hasBits()) return false; + if (hasBits()) { + if (!getBits().equals(other.getBits())) return false; + } + if (getHashCount() != other.getHashCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBits()) { + hash = (37 * hash) + BITS_FIELD_NUMBER; + hash = (53 * hash) + getBits().hashCode(); + } + hash = (37 * hash) + HASH_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getHashCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.BloomFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BloomFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BloomFilter parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BloomFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BloomFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BloomFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BloomFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BloomFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BloomFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BloomFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BloomFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BloomFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.BloomFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter).
+   * The bloom filter hashes the entries with MD5 and treats the resulting 128-bit
+   * hash as 2 distinct 64-bit hash values, interpreted as unsigned integers
+   * using 2's complement encoding.
+   * These two hash values, named `h1` and `h2`, are then used to compute the
+   * `hash_count` hash values using the formula, starting at `i=0`:
+   *     h(i) = h1 + (i * h2)
+   * These resulting values are then taken modulo the number of bits in the bloom
+   * filter to get the bits of the bloom filter to test for the given entry.
+   * 
+ * + * Protobuf type {@code google.firestore.v1.BloomFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.BloomFilter) + com.google.firestore.v1.BloomFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BloomFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BloomFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BloomFilter.class, + com.google.firestore.v1.BloomFilter.Builder.class); + } + + // Construct using com.google.firestore.v1.BloomFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bits_ = null; + if (bitsBuilder_ != null) { + bitsBuilder_.dispose(); + bitsBuilder_ = null; + } + hashCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.BloomFilterProto + .internal_static_google_firestore_v1_BloomFilter_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.BloomFilter getDefaultInstanceForType() { + return com.google.firestore.v1.BloomFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.BloomFilter build() { + com.google.firestore.v1.BloomFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.BloomFilter buildPartial() { + com.google.firestore.v1.BloomFilter result = new com.google.firestore.v1.BloomFilter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.v1.BloomFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bits_ = bitsBuilder_ == null ? bits_ : bitsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hashCount_ = hashCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.BloomFilter) { + return mergeFrom((com.google.firestore.v1.BloomFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.BloomFilter other) { + if (other == com.google.firestore.v1.BloomFilter.getDefaultInstance()) return this; + if (other.hasBits()) { + mergeBits(other.getBits()); + } + if (other.getHashCount() != 0) { + setHashCount(other.getHashCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getBitsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + hashCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.firestore.v1.BitSequence bits_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.BitSequence, + com.google.firestore.v1.BitSequence.Builder, + com.google.firestore.v1.BitSequenceOrBuilder> + bitsBuilder_; + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + * + * @return Whether the bits field is set. + */ + public boolean hasBits() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + * + * @return The bits. + */ + public com.google.firestore.v1.BitSequence getBits() { + if (bitsBuilder_ == null) { + return bits_ == null ? com.google.firestore.v1.BitSequence.getDefaultInstance() : bits_; + } else { + return bitsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + public Builder setBits(com.google.firestore.v1.BitSequence value) { + if (bitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bits_ = value; + } else { + bitsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + public Builder setBits(com.google.firestore.v1.BitSequence.Builder builderForValue) { + if (bitsBuilder_ == null) { + bits_ = builderForValue.build(); + } else { + bitsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + public Builder mergeBits(com.google.firestore.v1.BitSequence value) { + if (bitsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bits_ != null + && bits_ != com.google.firestore.v1.BitSequence.getDefaultInstance()) { + getBitsBuilder().mergeFrom(value); + } else { + bits_ = value; + } + } else { + bitsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + public Builder clearBits() { + bitField0_ = (bitField0_ & ~0x00000001); + bits_ = null; + if (bitsBuilder_ != null) { + bitsBuilder_.dispose(); + bitsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + public com.google.firestore.v1.BitSequence.Builder getBitsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBitsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + public com.google.firestore.v1.BitSequenceOrBuilder getBitsOrBuilder() { + if (bitsBuilder_ != null) { + return bitsBuilder_.getMessageOrBuilder(); + } else { + return bits_ == null ? com.google.firestore.v1.BitSequence.getDefaultInstance() : bits_; + } + } + /** + * + * + *
+     * The bloom filter data.
+     * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.BitSequence, + com.google.firestore.v1.BitSequence.Builder, + com.google.firestore.v1.BitSequenceOrBuilder> + getBitsFieldBuilder() { + if (bitsBuilder_ == null) { + bitsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.BitSequence, + com.google.firestore.v1.BitSequence.Builder, + com.google.firestore.v1.BitSequenceOrBuilder>( + getBits(), getParentForChildren(), isClean()); + bits_ = null; + } + return bitsBuilder_; + } + + private int hashCount_; + /** + * + * + *
+     * The number of hashes used by the algorithm.
+     * 
+ * + * int32 hash_count = 2; + * + * @return The hashCount. + */ + @java.lang.Override + public int getHashCount() { + return hashCount_; + } + /** + * + * + *
+     * The number of hashes used by the algorithm.
+     * 
+ * + * int32 hash_count = 2; + * + * @param value The hashCount to set. + * @return This builder for chaining. + */ + public Builder setHashCount(int value) { + + hashCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of hashes used by the algorithm.
+     * 
+ * + * int32 hash_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearHashCount() { + bitField0_ = (bitField0_ & ~0x00000002); + hashCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.BloomFilter) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.BloomFilter) + private static final com.google.firestore.v1.BloomFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.BloomFilter(); + } + + public static com.google.firestore.v1.BloomFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BloomFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.BloomFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterOrBuilder.java new file mode 100644 index 0000000000..34c3847b62 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/bloom_filter.proto + +package com.google.firestore.v1; + +public interface BloomFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.BloomFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The bloom filter data.
+   * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + * + * @return Whether the bits field is set. + */ + boolean hasBits(); + /** + * + * + *
+   * The bloom filter data.
+   * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + * + * @return The bits. + */ + com.google.firestore.v1.BitSequence getBits(); + /** + * + * + *
+   * The bloom filter data.
+   * 
+ * + * .google.firestore.v1.BitSequence bits = 1; + */ + com.google.firestore.v1.BitSequenceOrBuilder getBitsOrBuilder(); + + /** + * + * + *
+   * The number of hashes used by the algorithm.
+   * 
+ * + * int32 hash_count = 2; + * + * @return The hashCount. + */ + int getHashCount(); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterProto.java new file mode 100644 index 0000000000..19f2f90ad9 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BloomFilterProto.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/bloom_filter.proto + +package com.google.firestore.v1; + +public final class BloomFilterProto { + private BloomFilterProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_BitSequence_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_BitSequence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_BloomFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_BloomFilter_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n&google/firestore/v1/bloom_filter.proto" + + "\022\023google.firestore.v1\".\n\013BitSequence\022\016\n\006" + + "bitmap\030\001 \001(\014\022\017\n\007padding\030\002 \001(\005\"Q\n\013BloomFi" + + "lter\022.\n\004bits\030\001 \001(\0132 .google.firestore.v1" + + ".BitSequence\022\022\n\nhash_count\030\002 \001(\005B\310\001\n\027com" + + ".google.firestore.v1B\020BloomFilterProtoP\001" + + "Z;cloud.google.com/go/firestore/apiv1/fi" + + "restorepb;firestorepb\242\002\004GCFS\252\002\031Google.Cl" + + "oud.Firestore.V1\312\002\031Google\\Cloud\\Firestor" + + "e\\V1\352\002\034Google::Cloud::Firestore::V1b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_firestore_v1_BitSequence_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_v1_BitSequence_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_BitSequence_descriptor, + new java.lang.String[] { + "Bitmap", "Padding", + }); + internal_static_google_firestore_v1_BloomFilter_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_firestore_v1_BloomFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_BloomFilter_descriptor, + new java.lang.String[] { + "Bits", "HashCount", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java index 03f63e4a40..6e907a27fd 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java @@ -104,6 +104,89 @@ public int getCount() { return count_; } + public static final int UNCHANGED_NAMES_FIELD_NUMBER = 3; + private com.google.firestore.v1.BloomFilter unchangedNames_; + /** + * + * + *
+   * A bloom filter that contains the UTF-8 byte encodings of the resource names
+   * of the documents that match
+   * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+   * that have NOT changed since the query results indicated by the resume token
+   * or timestamp given in `Target.resume_type`.
+   * This bloom filter may be omitted at the server's discretion, such as if it
+   * is deemed that the client will not make use of it or if it is too
+   * computationally expensive to calculate or transmit. Clients must gracefully
+   * handle this field being absent by falling back to the logic used before
+   * this field existed; that is, re-add the target without a resume token to
+   * figure out which documents in the client's cache are out of sync.
+   * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + * + * @return Whether the unchangedNames field is set. + */ + @java.lang.Override + public boolean hasUnchangedNames() { + return unchangedNames_ != null; + } + /** + * + * + *
+   * A bloom filter that contains the UTF-8 byte encodings of the resource names
+   * of the documents that match
+   * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+   * that have NOT changed since the query results indicated by the resume token
+   * or timestamp given in `Target.resume_type`.
+   * This bloom filter may be omitted at the server's discretion, such as if it
+   * is deemed that the client will not make use of it or if it is too
+   * computationally expensive to calculate or transmit. Clients must gracefully
+   * handle this field being absent by falling back to the logic used before
+   * this field existed; that is, re-add the target without a resume token to
+   * figure out which documents in the client's cache are out of sync.
+   * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + * + * @return The unchangedNames. + */ + @java.lang.Override + public com.google.firestore.v1.BloomFilter getUnchangedNames() { + return unchangedNames_ == null + ? com.google.firestore.v1.BloomFilter.getDefaultInstance() + : unchangedNames_; + } + /** + * + * + *
+   * A bloom filter that contains the UTF-8 byte encodings of the resource names
+   * of the documents that match
+   * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+   * that have NOT changed since the query results indicated by the resume token
+   * or timestamp given in `Target.resume_type`.
+   * This bloom filter may be omitted at the server's discretion, such as if it
+   * is deemed that the client will not make use of it or if it is too
+   * computationally expensive to calculate or transmit. Clients must gracefully
+   * handle this field being absent by falling back to the logic used before
+   * this field existed; that is, re-add the target without a resume token to
+   * figure out which documents in the client's cache are out of sync.
+   * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + @java.lang.Override + public com.google.firestore.v1.BloomFilterOrBuilder getUnchangedNamesOrBuilder() { + return unchangedNames_ == null + ? com.google.firestore.v1.BloomFilter.getDefaultInstance() + : unchangedNames_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -124,6 +207,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (count_ != 0) { output.writeInt32(2, count_); } + if (unchangedNames_ != null) { + output.writeMessage(3, getUnchangedNames()); + } getUnknownFields().writeTo(output); } @@ -139,6 +225,9 @@ public int getSerializedSize() { if (count_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, count_); } + if (unchangedNames_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUnchangedNames()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -156,6 +245,10 @@ public boolean equals(final java.lang.Object obj) { if (getTargetId() != other.getTargetId()) return false; if (getCount() != other.getCount()) return false; + if (hasUnchangedNames() != other.hasUnchangedNames()) return false; + if (hasUnchangedNames()) { + if (!getUnchangedNames().equals(other.getUnchangedNames())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -171,6 +264,10 @@ public int hashCode() { hash = (53 * hash) + getTargetId(); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + getCount(); + if (hasUnchangedNames()) { + hash = (37 * hash) + UNCHANGED_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getUnchangedNames().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -312,6 +409,11 @@ public Builder clear() { bitField0_ = 0; targetId_ = 0; count_ = 0; + unchangedNames_ = null; + if (unchangedNamesBuilder_ != null) { + unchangedNamesBuilder_.dispose(); + unchangedNamesBuilder_ = null; + } return this; } @@ -354,6 +456,10 @@ private void buildPartial0(com.google.firestore.v1.ExistenceFilter result) { if (((from_bitField0_ & 0x00000002) != 0)) { result.count_ = count_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.unchangedNames_ = + unchangedNamesBuilder_ == null ? unchangedNames_ : unchangedNamesBuilder_.build(); + } } @java.lang.Override @@ -407,6 +513,9 @@ public Builder mergeFrom(com.google.firestore.v1.ExistenceFilter other) { if (other.getCount() != 0) { setCount(other.getCount()); } + if (other.hasUnchangedNames()) { + mergeUnchangedNames(other.getUnchangedNames()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -445,6 +554,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 26: + { + input.readMessage(getUnchangedNamesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -579,6 +694,288 @@ public Builder clearCount() { return this; } + private com.google.firestore.v1.BloomFilter unchangedNames_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.BloomFilter, + com.google.firestore.v1.BloomFilter.Builder, + com.google.firestore.v1.BloomFilterOrBuilder> + unchangedNamesBuilder_; + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + * + * @return Whether the unchangedNames field is set. + */ + public boolean hasUnchangedNames() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + * + * @return The unchangedNames. + */ + public com.google.firestore.v1.BloomFilter getUnchangedNames() { + if (unchangedNamesBuilder_ == null) { + return unchangedNames_ == null + ? com.google.firestore.v1.BloomFilter.getDefaultInstance() + : unchangedNames_; + } else { + return unchangedNamesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + public Builder setUnchangedNames(com.google.firestore.v1.BloomFilter value) { + if (unchangedNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + unchangedNames_ = value; + } else { + unchangedNamesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + public Builder setUnchangedNames(com.google.firestore.v1.BloomFilter.Builder builderForValue) { + if (unchangedNamesBuilder_ == null) { + unchangedNames_ = builderForValue.build(); + } else { + unchangedNamesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + public Builder mergeUnchangedNames(com.google.firestore.v1.BloomFilter value) { + if (unchangedNamesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && unchangedNames_ != null + && unchangedNames_ != com.google.firestore.v1.BloomFilter.getDefaultInstance()) { + getUnchangedNamesBuilder().mergeFrom(value); + } else { + unchangedNames_ = value; + } + } else { + unchangedNamesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + public Builder clearUnchangedNames() { + bitField0_ = (bitField0_ & ~0x00000004); + unchangedNames_ = null; + if (unchangedNamesBuilder_ != null) { + unchangedNamesBuilder_.dispose(); + unchangedNamesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + public com.google.firestore.v1.BloomFilter.Builder getUnchangedNamesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUnchangedNamesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + public com.google.firestore.v1.BloomFilterOrBuilder getUnchangedNamesOrBuilder() { + if (unchangedNamesBuilder_ != null) { + return unchangedNamesBuilder_.getMessageOrBuilder(); + } else { + return unchangedNames_ == null + ? com.google.firestore.v1.BloomFilter.getDefaultInstance() + : unchangedNames_; + } + } + /** + * + * + *
+     * A bloom filter that contains the UTF-8 byte encodings of the resource names
+     * of the documents that match
+     * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+     * that have NOT changed since the query results indicated by the resume token
+     * or timestamp given in `Target.resume_type`.
+     * This bloom filter may be omitted at the server's discretion, such as if it
+     * is deemed that the client will not make use of it or if it is too
+     * computationally expensive to calculate or transmit. Clients must gracefully
+     * handle this field being absent by falling back to the logic used before
+     * this field existed; that is, re-add the target without a resume token to
+     * figure out which documents in the client's cache are out of sync.
+     * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.BloomFilter, + com.google.firestore.v1.BloomFilter.Builder, + com.google.firestore.v1.BloomFilterOrBuilder> + getUnchangedNamesFieldBuilder() { + if (unchangedNamesBuilder_ == null) { + unchangedNamesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.BloomFilter, + com.google.firestore.v1.BloomFilter.Builder, + com.google.firestore.v1.BloomFilterOrBuilder>( + getUnchangedNames(), getParentForChildren(), isClean()); + unchangedNames_ = null; + } + return unchangedNamesBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java index cb29e40fb9..991950c9a0 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java @@ -51,4 +51,72 @@ public interface ExistenceFilterOrBuilder * @return The count. */ int getCount(); + + /** + * + * + *
+   * A bloom filter that contains the UTF-8 byte encodings of the resource names
+   * of the documents that match
+   * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+   * that have NOT changed since the query results indicated by the resume token
+   * or timestamp given in `Target.resume_type`.
+   * This bloom filter may be omitted at the server's discretion, such as if it
+   * is deemed that the client will not make use of it or if it is too
+   * computationally expensive to calculate or transmit. Clients must gracefully
+   * handle this field being absent by falling back to the logic used before
+   * this field existed; that is, re-add the target without a resume token to
+   * figure out which documents in the client's cache are out of sync.
+   * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + * + * @return Whether the unchangedNames field is set. + */ + boolean hasUnchangedNames(); + /** + * + * + *
+   * A bloom filter that contains the UTF-8 byte encodings of the resource names
+   * of the documents that match
+   * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+   * that have NOT changed since the query results indicated by the resume token
+   * or timestamp given in `Target.resume_type`.
+   * This bloom filter may be omitted at the server's discretion, such as if it
+   * is deemed that the client will not make use of it or if it is too
+   * computationally expensive to calculate or transmit. Clients must gracefully
+   * handle this field being absent by falling back to the logic used before
+   * this field existed; that is, re-add the target without a resume token to
+   * figure out which documents in the client's cache are out of sync.
+   * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + * + * @return The unchangedNames. + */ + com.google.firestore.v1.BloomFilter getUnchangedNames(); + /** + * + * + *
+   * A bloom filter that contains the UTF-8 byte encodings of the resource names
+   * of the documents that match
+   * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
+   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+   * that have NOT changed since the query results indicated by the resume token
+   * or timestamp given in `Target.resume_type`.
+   * This bloom filter may be omitted at the server's discretion, such as if it
+   * is deemed that the client will not make use of it or if it is too
+   * computationally expensive to calculate or transmit. Clients must gracefully
+   * handle this field being absent by falling back to the logic used before
+   * this field existed; that is, re-add the target without a resume token to
+   * figure out which documents in the client's cache are out of sync.
+   * 
+ * + * .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + com.google.firestore.v1.BloomFilterOrBuilder getUnchangedNamesOrBuilder(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java index 181dcee36e..12812e5288 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java @@ -181,237 +181,239 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tore/v1/document.proto\032\037google/firestore" + "/v1/query.proto\032\037google/firestore/v1/wri" + "te.proto\032\033google/protobuf/empty.proto\032\037g" - + "oogle/protobuf/timestamp.proto\032\027google/r" - + "pc/status.proto\"\270\001\n\022GetDocumentRequest\022\021" - + "\n\004name\030\001 \001(\tB\003\340A\002\022/\n\004mask\030\002 \001(\0132!.google" - + ".firestore.v1.DocumentMask\022\025\n\013transactio" - + "n\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132\032.google.pr" - + "otobuf.TimestampH\000B\026\n\024consistency_select" - + "or\"\273\002\n\024ListDocumentsRequest\022\023\n\006parent\030\001 " - + "\001(\tB\003\340A\002\022\032\n\rcollection_id\030\002 \001(\tB\003\340A\001\022\026\n\t" - + "page_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\t" - + "B\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\0224\n\004mask\030\007 \001" - + "(\0132!.google.firestore.v1.DocumentMaskB\003\340" - + "A\001\022\025\n\013transaction\030\010 \001(\014H\000\022/\n\tread_time\030\n" - + " \001(\0132\032.google.protobuf.TimestampH\000\022\024\n\014sh" - + "ow_missing\030\014 \001(\010B\026\n\024consistency_selector" - + "\"b\n\025ListDocumentsResponse\0220\n\tdocuments\030\001" - + " \003(\0132\035.google.firestore.v1.Document\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"\304\001\n\025CreateDocumentR" - + "equest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\032\n\rcollectio" - + "n_id\030\002 \001(\tB\003\340A\002\022\023\n\013document_id\030\003 \001(\t\0224\n\010" - + "document\030\004 \001(\0132\035.google.firestore.v1.Doc" - + "umentB\003\340A\002\022/\n\004mask\030\005 \001(\0132!.google.firest" - + "ore.v1.DocumentMask\"\363\001\n\025UpdateDocumentRe" - + "quest\0224\n\010document\030\001 \001(\0132\035.google.firesto" - + "re.v1.DocumentB\003\340A\002\0226\n\013update_mask\030\002 \001(\013" - + "2!.google.firestore.v1.DocumentMask\022/\n\004m" - + "ask\030\003 \001(\0132!.google.firestore.v1.Document" - + "Mask\022;\n\020current_document\030\004 \001(\0132!.google." - + "firestore.v1.Precondition\"g\n\025DeleteDocum" - + "entRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022;\n\020current" - + "_document\030\002 \001(\0132!.google.firestore.v1.Pr" - + "econdition\"\231\002\n\030BatchGetDocumentsRequest\022" - + "\025\n\010database\030\001 \001(\tB\003\340A\002\022\021\n\tdocuments\030\002 \003(" - + "\t\022/\n\004mask\030\003 \001(\0132!.google.firestore.v1.Do" - + "cumentMask\022\025\n\013transaction\030\004 \001(\014H\000\022B\n\017new" - + "_transaction\030\005 \001(\0132\'.google.firestore.v1" - + ".TransactionOptionsH\000\022/\n\tread_time\030\007 \001(\013" - + "2\032.google.protobuf.TimestampH\000B\026\n\024consis" - + "tency_selector\"\254\001\n\031BatchGetDocumentsResp" - + "onse\022.\n\005found\030\001 \001(\0132\035.google.firestore.v" - + "1.DocumentH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013trans" - + "action\030\003 \001(\014\022-\n\tread_time\030\004 \001(\0132\032.google" - + ".protobuf.TimestampB\010\n\006result\"j\n\027BeginTr" - + "ansactionRequest\022\025\n\010database\030\001 \001(\tB\003\340A\002\022" - + "8\n\007options\030\002 \001(\0132\'.google.firestore.v1.T" - + "ransactionOptions\"/\n\030BeginTransactionRes" - + "ponse\022\023\n\013transaction\030\001 \001(\014\"g\n\rCommitRequ" - + "est\022\025\n\010database\030\001 \001(\tB\003\340A\002\022*\n\006writes\030\002 \003" - + "(\0132\032.google.firestore.v1.Write\022\023\n\013transa" - + "ction\030\003 \001(\014\"z\n\016CommitResponse\0227\n\rwrite_r" - + "esults\030\001 \003(\0132 .google.firestore.v1.Write" - + "Result\022/\n\013commit_time\030\002 \001(\0132\032.google.pro" - + "tobuf.Timestamp\"B\n\017RollbackRequest\022\025\n\010da" - + "tabase\030\001 \001(\tB\003\340A\002\022\030\n\013transaction\030\002 \001(\014B\003" - + "\340A\002\"\232\002\n\017RunQueryRequest\022\023\n\006parent\030\001 \001(\tB" - + "\003\340A\002\022@\n\020structured_query\030\002 \001(\0132$.google." - + "firestore.v1.StructuredQueryH\000\022\025\n\013transa" - + "ction\030\005 \001(\014H\001\022B\n\017new_transaction\030\006 \001(\0132\'" - + ".google.firestore.v1.TransactionOptionsH" - + "\001\022/\n\tread_time\030\007 \001(\0132\032.google.protobuf.T" - + "imestampH\001B\014\n\nquery_typeB\026\n\024consistency_" - + "selector\"\311\001\n\020RunQueryResponse\022\023\n\013transac" - + "tion\030\002 \001(\014\022/\n\010document\030\001 \001(\0132\035.google.fi" - + "restore.v1.Document\022-\n\tread_time\030\003 \001(\0132\032" - + ".google.protobuf.Timestamp\022\027\n\017skipped_re" - + "sults\030\004 \001(\005\022\016\n\004done\030\006 \001(\010H\000B\027\n\025continuat" - + "ion_selector\"\274\002\n\032RunAggregationQueryRequ" - + "est\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022W\n\034structured_a" - + "ggregation_query\030\002 \001(\0132/.google.firestor" - + "e.v1.StructuredAggregationQueryH\000\022\025\n\013tra" - + "nsaction\030\004 \001(\014H\001\022B\n\017new_transaction\030\005 \001(" - + "\0132\'.google.firestore.v1.TransactionOptio" - + "nsH\001\022/\n\tread_time\030\006 \001(\0132\032.google.protobu" - + "f.TimestampH\001B\014\n\nquery_typeB\026\n\024consisten" - + "cy_selector\"\231\001\n\033RunAggregationQueryRespo" - + "nse\0226\n\006result\030\001 \001(\0132&.google.firestore.v" - + "1.AggregationResult\022\023\n\013transaction\030\002 \001(\014" - + "\022-\n\tread_time\030\003 \001(\0132\032.google.protobuf.Ti" - + "mestamp\"\205\002\n\025PartitionQueryRequest\022\023\n\006par" - + "ent\030\001 \001(\tB\003\340A\002\022@\n\020structured_query\030\002 \001(\013" - + "2$.google.firestore.v1.StructuredQueryH\000" - + "\022\027\n\017partition_count\030\003 \001(\003\022\022\n\npage_token\030" - + "\004 \001(\t\022\021\n\tpage_size\030\005 \001(\005\022/\n\tread_time\030\006 " - + "\001(\0132\032.google.protobuf.TimestampH\001B\014\n\nque" - + "ry_typeB\026\n\024consistency_selector\"b\n\026Parti" - + "tionQueryResponse\022/\n\npartitions\030\001 \003(\0132\033." - + "google.firestore.v1.Cursor\022\027\n\017next_page_" - + "token\030\002 \001(\t\"\350\001\n\014WriteRequest\022\025\n\010database" - + "\030\001 \001(\tB\003\340A\002\022\021\n\tstream_id\030\002 \001(\t\022*\n\006writes" - + "\030\003 \003(\0132\032.google.firestore.v1.Write\022\024\n\014st" - + "ream_token\030\004 \001(\014\022=\n\006labels\030\005 \003(\0132-.googl" - + "e.firestore.v1.WriteRequest.LabelsEntry\032" - + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\"\242\001\n\rWriteResponse\022\021\n\tstream_id\030\001 " - + "\001(\t\022\024\n\014stream_token\030\002 \001(\014\0227\n\rwrite_resul" - + "ts\030\003 \003(\0132 .google.firestore.v1.WriteResu" - + "lt\022/\n\013commit_time\030\004 \001(\0132\032.google.protobu" - + "f.Timestamp\"\362\001\n\rListenRequest\022\025\n\010databas" - + "e\030\001 \001(\tB\003\340A\002\0221\n\nadd_target\030\002 \001(\0132\033.googl" - + "e.firestore.v1.TargetH\000\022\027\n\rremove_target" - + "\030\003 \001(\005H\000\022>\n\006labels\030\004 \003(\0132..google.firest" - + "ore.v1.ListenRequest.LabelsEntry\032-\n\013Labe" - + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B" - + "\017\n\rtarget_change\"\325\002\n\016ListenResponse\022:\n\rt" - + "arget_change\030\002 \001(\0132!.google.firestore.v1" - + ".TargetChangeH\000\022>\n\017document_change\030\003 \001(\013" - + "2#.google.firestore.v1.DocumentChangeH\000\022" - + ">\n\017document_delete\030\004 \001(\0132#.google.firest" - + "ore.v1.DocumentDeleteH\000\022>\n\017document_remo" - + "ve\030\006 \001(\0132#.google.firestore.v1.DocumentR" - + "emoveH\000\0226\n\006filter\030\005 \001(\0132$.google.firesto" - + "re.v1.ExistenceFilterH\000B\017\n\rresponse_type" - + "\"\241\003\n\006Target\0228\n\005query\030\002 \001(\0132\'.google.fire" - + "store.v1.Target.QueryTargetH\000\022@\n\tdocumen" - + "ts\030\003 \001(\0132+.google.firestore.v1.Target.Do" - + "cumentsTargetH\000\022\026\n\014resume_token\030\004 \001(\014H\001\022" - + "/\n\tread_time\030\013 \001(\0132\032.google.protobuf.Tim" - + "estampH\001\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004once\030\006 \001(" - + "\010\032$\n\017DocumentsTarget\022\021\n\tdocuments\030\002 \003(\t\032" - + "m\n\013QueryTarget\022\016\n\006parent\030\001 \001(\t\022@\n\020struct" - + "ured_query\030\002 \001(\0132$.google.firestore.v1.S" - + "tructuredQueryH\000B\014\n\nquery_typeB\r\n\013target" - + "_typeB\r\n\013resume_type\"\252\002\n\014TargetChange\022N\n" - + "\022target_change_type\030\001 \001(\01622.google.fires" - + "tore.v1.TargetChange.TargetChangeType\022\022\n" - + "\ntarget_ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.googl" - + "e.rpc.Status\022\024\n\014resume_token\030\004 \001(\014\022-\n\tre" - + "ad_time\030\006 \001(\0132\032.google.protobuf.Timestam" - + "p\"N\n\020TargetChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003" - + "ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020" - + "\004\"\237\001\n\030ListCollectionIdsRequest\022\023\n\006parent" - + "\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" - + "oken\030\003 \001(\t\022/\n\tread_time\030\004 \001(\0132\032.google.p" - + "rotobuf.TimestampH\000B\026\n\024consistency_selec" - + "tor\"L\n\031ListCollectionIdsResponse\022\026\n\016coll" - + "ection_ids\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(" - + "\t\"\311\001\n\021BatchWriteRequest\022\025\n\010database\030\001 \001(" - + "\tB\003\340A\002\022*\n\006writes\030\002 \003(\0132\032.google.firestor" - + "e.v1.Write\022B\n\006labels\030\003 \003(\01322.google.fire" - + "store.v1.BatchWriteRequest.LabelsEntry\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001\"q\n\022BatchWriteResponse\0227\n\rwrite_res" - + "ults\030\001 \003(\0132 .google.firestore.v1.WriteRe" - + "sult\022\"\n\006status\030\002 \003(\0132\022.google.rpc.Status" - + "2\332\031\n\tFirestore\022\217\001\n\013GetDocument\022\'.google." - + "firestore.v1.GetDocumentRequest\032\035.google" - + ".firestore.v1.Document\"8\202\323\344\223\0022\0220/v1/{nam" - + "e=projects/*/databases/*/documents/*/**}" - + "\022\365\001\n\rListDocuments\022).google.firestore.v1" - + ".ListDocumentsRequest\032*.google.firestore" - + ".v1.ListDocumentsResponse\"\214\001\202\323\344\223\002\205\001\022B/v1" - + "/{parent=projects/*/databases/*/document" - + "s/*/**}/{collection_id}Z?\022=/v1/{parent=p" - + "rojects/*/databases/*/documents}/{collec" - + "tion_id}\022\277\001\n\016UpdateDocument\022*.google.fir" - + "estore.v1.UpdateDocumentRequest\032\035.google" - + ".firestore.v1.Document\"b\202\323\344\223\002E29/v1/{doc" - + "ument.name=projects/*/databases/*/docume" - + "nts/*/**}:\010document\332A\024document,update_ma" - + "sk\022\225\001\n\016DeleteDocument\022*.google.firestore" - + ".v1.DeleteDocumentRequest\032\026.google.proto" - + "buf.Empty\"?\202\323\344\223\0022*0/v1/{name=projects/*/" - + "databases/*/documents/*/**}\332A\004name\022\271\001\n\021B" - + "atchGetDocuments\022-.google.firestore.v1.B" - + "atchGetDocumentsRequest\032..google.firesto" - + "re.v1.BatchGetDocumentsResponse\"C\202\323\344\223\002=\"" - + "8/v1/{database=projects/*/databases/*}/d" - + "ocuments:batchGet:\001*0\001\022\307\001\n\020BeginTransact" - + "ion\022,.google.firestore.v1.BeginTransacti" - + "onRequest\032-.google.firestore.v1.BeginTra" - + "nsactionResponse\"V\202\323\344\223\002E\"@/v1/{database=" - + "projects/*/databases/*}/documents:beginT" - + "ransaction:\001*\332A\010database\022\246\001\n\006Commit\022\".go" - + "ogle.firestore.v1.CommitRequest\032#.google" - + ".firestore.v1.CommitResponse\"S\202\323\344\223\002;\"6/v" - + "1/{database=projects/*/databases/*}/docu" - + "ments:commit:\001*\332A\017database,writes\022\244\001\n\010Ro" - + "llback\022$.google.firestore.v1.RollbackReq" - + "uest\032\026.google.protobuf.Empty\"Z\202\323\344\223\002=\"8/v" - + "1/{database=projects/*/databases/*}/docu" - + "ments:rollback:\001*\332A\024database,transaction" - + "\022\337\001\n\010RunQuery\022$.google.firestore.v1.RunQ" - + "ueryRequest\032%.google.firestore.v1.RunQue" - + "ryResponse\"\203\001\202\323\344\223\002}\"6/v1/{parent=project" - + "s/*/databases/*/documents}:runQuery:\001*Z@" - + "\";/v1/{parent=projects/*/databases/*/doc" - + "uments/*/**}:runQuery:\001*0\001\022\227\002\n\023RunAggreg" - + "ationQuery\022/.google.firestore.v1.RunAggr" - + "egationQueryRequest\0320.google.firestore.v" - + "1.RunAggregationQueryResponse\"\232\001\202\323\344\223\002\223\001\"" - + "A/v1/{parent=projects/*/databases/*/docu" - + "ments}:runAggregationQuery:\001*ZK\"F/v1/{pa" - + "rent=projects/*/databases/*/documents/*/" - + "**}:runAggregationQuery:\001*0\001\022\374\001\n\016Partiti" - + "onQuery\022*.google.firestore.v1.PartitionQ" - + "ueryRequest\032+.google.firestore.v1.Partit" - + "ionQueryResponse\"\220\001\202\323\344\223\002\211\001\"\n\006labels\030\004 \003(\0132..google.firestore.v1.L" + + "istenRequest.LabelsEntry\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarge" + + "t_change\"\325\002\n\016ListenResponse\022:\n\rtarget_ch" + + "ange\030\002 \001(\0132!.google.firestore.v1.TargetC" + + "hangeH\000\022>\n\017document_change\030\003 \001(\0132#.googl" + + "e.firestore.v1.DocumentChangeH\000\022>\n\017docum" + + "ent_delete\030\004 \001(\0132#.google.firestore.v1.D" + + "ocumentDeleteH\000\022>\n\017document_remove\030\006 \001(\013" + + "2#.google.firestore.v1.DocumentRemoveH\000\022" + + "6\n\006filter\030\005 \001(\0132$.google.firestore.v1.Ex" + + "istenceFilterH\000B\017\n\rresponse_type\"\326\003\n\006Tar" + + "get\0228\n\005query\030\002 \001(\0132\'.google.firestore.v1" + + ".Target.QueryTargetH\000\022@\n\tdocuments\030\003 \001(\013" + + "2+.google.firestore.v1.Target.DocumentsT" + + "argetH\000\022\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tread_" + + "time\030\013 \001(\0132\032.google.protobuf.TimestampH\001" + + "\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\0223\n\016exp" + + "ected_count\030\014 \001(\0132\033.google.protobuf.Int3" + + "2Value\032$\n\017DocumentsTarget\022\021\n\tdocuments\030\002" + + " \003(\t\032m\n\013QueryTarget\022\016\n\006parent\030\001 \001(\t\022@\n\020s" + + "tructured_query\030\002 \001(\0132$.google.firestore" + + ".v1.StructuredQueryH\000B\014\n\nquery_typeB\r\n\013t" + + "arget_typeB\r\n\013resume_type\"\252\002\n\014TargetChan" + + "ge\022N\n\022target_change_type\030\001 \001(\01622.google." + + "firestore.v1.TargetChange.TargetChangeTy" + + "pe\022\022\n\ntarget_ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022." + + "google.rpc.Status\022\024\n\014resume_token\030\004 \001(\014\022" + + "-\n\tread_time\030\006 \001(\0132\032.google.protobuf.Tim" + + "estamp\"N\n\020TargetChangeType\022\r\n\tNO_CHANGE\020" + + "\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005R" + + "ESET\020\004\"\237\001\n\030ListCollectionIdsRequest\022\023\n\006p" + + "arent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\np" + + "age_token\030\003 \001(\t\022/\n\tread_time\030\004 \001(\0132\032.goo" + + "gle.protobuf.TimestampH\000B\026\n\024consistency_" + + "selector\"L\n\031ListCollectionIdsResponse\022\026\n" + + "\016collection_ids\030\001 \003(\t\022\027\n\017next_page_token" + + "\030\002 \001(\t\"\311\001\n\021BatchWriteRequest\022\025\n\010database" + + "\030\001 \001(\tB\003\340A\002\022*\n\006writes\030\002 \003(\0132\032.google.fir" + + "estore.v1.Write\022B\n\006labels\030\003 \003(\01322.google" + + ".firestore.v1.BatchWriteRequest.LabelsEn" + + "try\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"q\n\022BatchWriteResponse\0227\n\rwrit" + + "e_results\030\001 \003(\0132 .google.firestore.v1.Wr" + + "iteResult\022\"\n\006status\030\002 \003(\0132\022.google.rpc.S" + + "tatus2\332\031\n\tFirestore\022\217\001\n\013GetDocument\022\'.go" + + "ogle.firestore.v1.GetDocumentRequest\032\035.g" + + "oogle.firestore.v1.Document\"8\202\323\344\223\0022\0220/v1" + + "/{name=projects/*/databases/*/documents/" + + "*/**}\022\365\001\n\rListDocuments\022).google.firesto" + + "re.v1.ListDocumentsRequest\032*.google.fire" + + "store.v1.ListDocumentsResponse\"\214\001\202\323\344\223\002\205\001" + + "\022B/v1/{parent=projects/*/databases/*/doc" + + "uments/*/**}/{collection_id}Z?\022=/v1/{par" + + "ent=projects/*/databases/*/documents}/{c" + + "ollection_id}\022\277\001\n\016UpdateDocument\022*.googl" + + "e.firestore.v1.UpdateDocumentRequest\032\035.g" + + "oogle.firestore.v1.Document\"b\202\323\344\223\002E29/v1" + + "/{document.name=projects/*/databases/*/d" + + "ocuments/*/**}:\010document\332A\024document,upda" + + "te_mask\022\225\001\n\016DeleteDocument\022*.google.fire" + + "store.v1.DeleteDocumentRequest\032\026.google." + + "protobuf.Empty\"?\202\323\344\223\0022*0/v1/{name=projec" + + "ts/*/databases/*/documents/*/**}\332A\004name\022" + + "\271\001\n\021BatchGetDocuments\022-.google.firestore" + + ".v1.BatchGetDocumentsRequest\032..google.fi" + + "restore.v1.BatchGetDocumentsResponse\"C\202\323" + + "\344\223\002=\"8/v1/{database=projects/*/databases" + + "/*}/documents:batchGet:\001*0\001\022\307\001\n\020BeginTra" + + "nsaction\022,.google.firestore.v1.BeginTran" + + "sactionRequest\032-.google.firestore.v1.Beg" + + "inTransactionResponse\"V\202\323\344\223\002E\"@/v1/{data" + + "base=projects/*/databases/*}/documents:b" + + "eginTransaction:\001*\332A\010database\022\246\001\n\006Commit" + + "\022\".google.firestore.v1.CommitRequest\032#.g" + + "oogle.firestore.v1.CommitResponse\"S\202\323\344\223\002" + + ";\"6/v1/{database=projects/*/databases/*}" + + "/documents:commit:\001*\332A\017database,writes\022\244" + + "\001\n\010Rollback\022$.google.firestore.v1.Rollba" + + "ckRequest\032\026.google.protobuf.Empty\"Z\202\323\344\223\002" + + "=\"8/v1/{database=projects/*/databases/*}" + + "/documents:rollback:\001*\332A\024database,transa" + + "ction\022\337\001\n\010RunQuery\022$.google.firestore.v1" + + ".RunQueryRequest\032%.google.firestore.v1.R" + + "unQueryResponse\"\203\001\202\323\344\223\002}\"6/v1/{parent=pr" + + "ojects/*/databases/*/documents}:runQuery" + + ":\001*Z@\";/v1/{parent=projects/*/databases/" + + "*/documents/*/**}:runQuery:\001*0\001\022\227\002\n\023RunA" + + "ggregationQuery\022/.google.firestore.v1.Ru" + + "nAggregationQueryRequest\0320.google.firest" + + "ore.v1.RunAggregationQueryResponse\"\232\001\202\323\344" + + "\223\002\223\001\"A/v1/{parent=projects/*/databases/*" + + "/documents}:runAggregationQuery:\001*ZK\"F/v" + "1/{parent=projects/*/databases/*/documen" - + "ts}:listCollectionIds:\001*ZI\"D/v1/{parent=" - + "projects/*/databases/*/documents/*/**}:l" - + "istCollectionIds:\001*\332A\006parent\022\244\001\n\nBatchWr" - + "ite\022&.google.firestore.v1.BatchWriteRequ" - + "est\032\'.google.firestore.v1.BatchWriteResp" - + "onse\"E\202\323\344\223\002?\":/v1/{database=projects/*/d" - + "atabases/*}/documents:batchWrite:\001*\022\257\001\n\016" - + "CreateDocument\022*.google.firestore.v1.Cre" - + "ateDocumentRequest\032\035.google.firestore.v1" - + ".Document\"R\202\323\344\223\002L\"@/v1/{parent=projects/" - + "*/databases/*/documents/**}/{collection_" - + "id}:\010document\032v\312A\030firestore.googleapis.c" - + "om\322AXhttps://www.googleapis.com/auth/clo" - + "ud-platform,https://www.googleapis.com/a" - + "uth/datastoreB\277\001\n\027com.google.firestore.v" - + "1B\016FirestoreProtoP\001Z;cloud.google.com/go" - + "/firestore/apiv1/firestorepb;firestorepb" - + "\252\002\031Google.Cloud.Firestore.V1\312\002\031Google\\Cl" - + "oud\\Firestore\\V1\352\002\034Google::Cloud::Firest" - + "ore::V1b\006proto3" + + "ts/*/**}:runAggregationQuery:\001*0\001\022\374\001\n\016Pa" + + "rtitionQuery\022*.google.firestore.v1.Parti" + + "tionQueryRequest\032+.google.firestore.v1.P" + + "artitionQueryResponse\"\220\001\202\323\344\223\002\211\001\" + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * + * .google.protobuf.Int32Value expected_count = 12; + * + * @return Whether the expectedCount field is set. + */ + @java.lang.Override + public boolean hasExpectedCount() { + return expectedCount_ != null; + } + /** + * + * + *
+   * The number of documents that last matched the query at the resume token or
+   * read time.
+   * This value is only relevant when a `resume_type` is provided. This value
+   * being present and greater than zero signals that the client wants
+   * `ExistenceFilter.unchanged_names` to be included in the response.
+   * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + * + * @return The expectedCount. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getExpectedCount() { + return expectedCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : expectedCount_; + } + /** + * + * + *
+   * The number of documents that last matched the query at the resume token or
+   * read time.
+   * This value is only relevant when a `resume_type` is provided. This value
+   * being present and greater than zero signals that the client wants
+   * `ExistenceFilter.unchanged_names` to be included in the response.
+   * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getExpectedCountOrBuilder() { + return expectedCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : expectedCount_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2341,6 +2403,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resumeTypeCase_ == 11) { output.writeMessage(11, (com.google.protobuf.Timestamp) resumeType_); } + if (expectedCount_ != null) { + output.writeMessage(12, getExpectedCount()); + } getUnknownFields().writeTo(output); } @@ -2376,6 +2441,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.protobuf.Timestamp) resumeType_); } + if (expectedCount_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getExpectedCount()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2393,6 +2461,10 @@ public boolean equals(final java.lang.Object obj) { if (getTargetId() != other.getTargetId()) return false; if (getOnce() != other.getOnce()) return false; + if (hasExpectedCount() != other.hasExpectedCount()) return false; + if (hasExpectedCount()) { + if (!getExpectedCount().equals(other.getExpectedCount())) return false; + } if (!getTargetTypeCase().equals(other.getTargetTypeCase())) return false; switch (targetTypeCase_) { case 2: @@ -2430,6 +2502,10 @@ public int hashCode() { hash = (53 * hash) + getTargetId(); hash = (37 * hash) + ONCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOnce()); + if (hasExpectedCount()) { + hash = (37 * hash) + EXPECTED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExpectedCount().hashCode(); + } switch (targetTypeCase_) { case 2: hash = (37 * hash) + QUERY_FIELD_NUMBER; @@ -2602,6 +2678,11 @@ public Builder clear() { } targetId_ = 0; once_ = false; + expectedCount_ = null; + if (expectedCountBuilder_ != null) { + expectedCountBuilder_.dispose(); + expectedCountBuilder_ = null; + } targetTypeCase_ = 0; targetType_ = null; resumeTypeCase_ = 0; @@ -2648,6 +2729,10 @@ private void buildPartial0(com.google.firestore.v1.Target result) { if (((from_bitField0_ & 0x00000020) != 0)) { result.once_ = once_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.expectedCount_ = + expectedCountBuilder_ == null ? expectedCount_ : expectedCountBuilder_.build(); + } } private void buildPartialOneofs(com.google.firestore.v1.Target result) { @@ -2717,6 +2802,9 @@ public Builder mergeFrom(com.google.firestore.v1.Target other) { if (other.getOnce() != false) { setOnce(other.getOnce()); } + if (other.hasExpectedCount()) { + mergeExpectedCount(other.getExpectedCount()); + } switch (other.getTargetTypeCase()) { case QUERY: { @@ -2811,6 +2899,12 @@ public Builder mergeFrom( resumeTypeCase_ = 11; break; } // case 90 + case 98: + { + input.readMessage(getExpectedCountFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3678,6 +3772,225 @@ public Builder clearOnce() { return this; } + private com.google.protobuf.Int32Value expectedCount_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + expectedCountBuilder_; + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + * + * @return Whether the expectedCount field is set. + */ + public boolean hasExpectedCount() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + * + * @return The expectedCount. + */ + public com.google.protobuf.Int32Value getExpectedCount() { + if (expectedCountBuilder_ == null) { + return expectedCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : expectedCount_; + } else { + return expectedCountBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + public Builder setExpectedCount(com.google.protobuf.Int32Value value) { + if (expectedCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expectedCount_ = value; + } else { + expectedCountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + public Builder setExpectedCount(com.google.protobuf.Int32Value.Builder builderForValue) { + if (expectedCountBuilder_ == null) { + expectedCount_ = builderForValue.build(); + } else { + expectedCountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + public Builder mergeExpectedCount(com.google.protobuf.Int32Value value) { + if (expectedCountBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && expectedCount_ != null + && expectedCount_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getExpectedCountBuilder().mergeFrom(value); + } else { + expectedCount_ = value; + } + } else { + expectedCountBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + public Builder clearExpectedCount() { + bitField0_ = (bitField0_ & ~0x00000040); + expectedCount_ = null; + if (expectedCountBuilder_ != null) { + expectedCountBuilder_.dispose(); + expectedCountBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + public com.google.protobuf.Int32Value.Builder getExpectedCountBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getExpectedCountFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + public com.google.protobuf.Int32ValueOrBuilder getExpectedCountOrBuilder() { + if (expectedCountBuilder_ != null) { + return expectedCountBuilder_.getMessageOrBuilder(); + } else { + return expectedCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : expectedCount_; + } + } + /** + * + * + *
+     * The number of documents that last matched the query at the resume token or
+     * read time.
+     * This value is only relevant when a `resume_type` is provided. This value
+     * being present and greater than zero signals that the client wants
+     * `ExistenceFilter.unchanged_names` to be included in the response.
+     * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getExpectedCountFieldBuilder() { + if (expectedCountBuilder_ == null) { + expectedCountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getExpectedCount(), getParentForChildren(), isClean()); + expectedCount_ = null; + } + return expectedCountBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java index 41b854b4e1..4f183c6456 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java @@ -187,6 +187,53 @@ public interface TargetOrBuilder */ boolean getOnce(); + /** + * + * + *
+   * The number of documents that last matched the query at the resume token or
+   * read time.
+   * This value is only relevant when a `resume_type` is provided. This value
+   * being present and greater than zero signals that the client wants
+   * `ExistenceFilter.unchanged_names` to be included in the response.
+   * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + * + * @return Whether the expectedCount field is set. + */ + boolean hasExpectedCount(); + /** + * + * + *
+   * The number of documents that last matched the query at the resume token or
+   * read time.
+   * This value is only relevant when a `resume_type` is provided. This value
+   * being present and greater than zero signals that the client wants
+   * `ExistenceFilter.unchanged_names` to be included in the response.
+   * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + * + * @return The expectedCount. + */ + com.google.protobuf.Int32Value getExpectedCount(); + /** + * + * + *
+   * The number of documents that last matched the query at the resume token or
+   * read time.
+   * This value is only relevant when a `resume_type` is provided. This value
+   * being present and greater than zero signals that the client wants
+   * `ExistenceFilter.unchanged_names` to be included in the response.
+   * 
+ * + * .google.protobuf.Int32Value expected_count = 12; + */ + com.google.protobuf.Int32ValueOrBuilder getExpectedCountOrBuilder(); + public com.google.firestore.v1.Target.TargetTypeCase getTargetTypeCase(); public com.google.firestore.v1.Target.ResumeTypeCase getResumeTypeCase(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java index 81eb14ec9d..8e7631fd67 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java @@ -69,7 +69,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\037google/firestore/v1/write.proto\022\023googl" - + "e.firestore.v1\032 google/firestore/v1/comm" + + "e.firestore.v1\032&google/firestore/v1/bloo" + + "m_filter.proto\032 google/firestore/v1/comm" + "on.proto\032\"google/firestore/v1/document.p" + "roto\032\037google/protobuf/timestamp.proto\"\333\002" + "\n\005Write\022/\n\006update\030\001 \001(\0132\035.google.firesto" @@ -107,18 +108,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "2\032.google.protobuf.Timestamp\"m\n\016Document" + "Remove\022\020\n\010document\030\001 \001(\t\022\032\n\022removed_targ" + "et_ids\030\002 \003(\005\022-\n\tread_time\030\004 \001(\0132\032.google" - + ".protobuf.Timestamp\"3\n\017ExistenceFilter\022\021" - + "\n\ttarget_id\030\001 \001(\005\022\r\n\005count\030\002 \001(\005B\302\001\n\027com" - + ".google.firestore.v1B\nWriteProtoP\001Z;clou" - + "d.google.com/go/firestore/apiv1/firestor" - + "epb;firestorepb\242\002\004GCFS\252\002\031Google.Cloud.Fi" - + "restore.V1\312\002\031Google\\Cloud\\Firestore\\V1\352\002" - + "\034Google::Cloud::Firestore::V1b\006proto3" + + ".protobuf.Timestamp\"n\n\017ExistenceFilter\022\021" + + "\n\ttarget_id\030\001 \001(\005\022\r\n\005count\030\002 \001(\005\0229\n\017unch" + + "anged_names\030\003 \001(\0132 .google.firestore.v1." + + "BloomFilterB\302\001\n\027com.google.firestore.v1B" + + "\nWriteProtoP\001Z;cloud.google.com/go/fires" + + "tore/apiv1/firestorepb;firestorepb\242\002\004GCF" + + "S\252\002\031Google.Cloud.Firestore.V1\312\002\031Google\\C" + + "loud\\Firestore\\V1\352\002\034Google::Cloud::Fires" + + "tore::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.firestore.v1.BloomFilterProto.getDescriptor(), com.google.firestore.v1.CommonProto.getDescriptor(), com.google.firestore.v1.DocumentProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -197,8 +201,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1_ExistenceFilter_descriptor, new java.lang.String[] { - "TargetId", "Count", + "TargetId", "Count", "UnchangedNames", }); + com.google.firestore.v1.BloomFilterProto.getDescriptor(); com.google.firestore.v1.CommonProto.getDescriptor(); com.google.firestore.v1.DocumentProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/bloom_filter.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/bloom_filter.proto new file mode 100644 index 0000000000..c00bb9c171 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/bloom_filter.proto @@ -0,0 +1,73 @@ +// 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. + +syntax = "proto3"; + +package google.firestore.v1; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb"; +option java_multiple_files = true; +option java_outer_classname = "BloomFilterProto"; +option java_package = "com.google.firestore.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\V1"; +option ruby_package = "Google::Cloud::Firestore::V1"; + +// A sequence of bits, encoded in a byte array. +// +// Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only +// exception is the last byte, which may store 8 _or fewer_ bits. The `padding` +// defines the number of bits of the last byte to be ignored as "padding". The +// values of these "padding" bits are unspecified and must be ignored. +// +// To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`. +// To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`. +// To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`. +// To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`. +// To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. +// +// The "size" of a `BitSequence` (the number of bits it contains) is calculated +// by this formula: `(bitmap.length * 8) - padding`. +message BitSequence { + // The bytes that encode the bit sequence. + // May have a length of zero. + bytes bitmap = 1; + + // The number of bits of the last byte in `bitmap` to ignore as "padding". + // If the length of `bitmap` is zero, then this value must be `0`. + // Otherwise, this value must be between 0 and 7, inclusive. + int32 padding = 2; +} + +// A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). +// +// The bloom filter hashes the entries with MD5 and treats the resulting 128-bit +// hash as 2 distinct 64-bit hash values, interpreted as unsigned integers +// using 2's complement encoding. +// +// These two hash values, named `h1` and `h2`, are then used to compute the +// `hash_count` hash values using the formula, starting at `i=0`: +// +// h(i) = h1 + (i * h2) +// +// These resulting values are then taken modulo the number of bits in the bloom +// filter to get the bits of the bloom filter to test for the given entry. +message BloomFilter { + // The bloom filter data. + BitSequence bits = 1; + + // The number of hashes used by the algorithm. + int32 hash_count = 2; +} diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto index 088388ade6..c6f7b921c8 100644 --- a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto @@ -26,6 +26,7 @@ import "google/firestore/v1/query.proto"; import "google/firestore/v1/write.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; @@ -932,6 +933,14 @@ message Target { // If the target should be removed once it is current and consistent. bool once = 6; + + // The number of documents that last matched the query at the resume token or + // read time. + // + // This value is only relevant when a `resume_type` is provided. This value + // being present and greater than zero signals that the client wants + // `ExistenceFilter.unchanged_names` to be included in the response. + google.protobuf.Int32Value expected_count = 12; } // Targets being watched have changed. diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto index 3760f9a34c..4ed0f5475f 100644 --- a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.firestore.v1; +import "google/firestore/v1/bloom_filter.proto"; import "google/firestore/v1/common.proto"; import "google/firestore/v1/document.proto"; import "google/protobuf/timestamp.proto"; @@ -264,4 +265,19 @@ message ExistenceFilter { // If different from the count of documents in the client that match, the // client must manually determine which documents no longer match the target. int32 count = 2; + + // A bloom filter that contains the UTF-8 byte encodings of the resource names + // of the documents that match + // [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + // `projects/{project_id}/databases/{database_id}/documents/{document_path}` + // that have NOT changed since the query results indicated by the resume token + // or timestamp given in `Target.resume_type`. + // + // This bloom filter may be omitted at the server's discretion, such as if it + // is deemed that the client will not make use of it or if it is too + // computationally expensive to calculate or transmit. Clients must gracefully + // handle this field being absent by falling back to the logic used before + // this field existed; that is, re-add the target without a resume token to + // figure out which documents in the client's cache are out of sync. + BloomFilter unchanged_names = 3; } diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 1667eb2ce6..21521ab43b 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -20,7 +20,7 @@ 1.8 1.8 - 2.46.0 + 2.47.0 UTF-8 @@ -30,7 +30,7 @@ com.google.cloud google-cloud-firestore - 3.9.6 + 3.10.0 @@ -66,7 +66,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.4.0 add-snippets-source diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 217c916364..9838f57923 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -23,7 +23,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> 1.8 1.8 - 2.46.0 + 2.47.0 UTF-8
@@ -32,7 +32,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.google.cloud libraries-bom - 26.13.0 + 26.14.0 pom import @@ -102,7 +102,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.graalvm.buildtools junit-platform-native - 0.9.21 + 0.9.22 test @@ -113,7 +113,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.maven.plugins maven-surefire-plugin - 3.0.0 + 3.1.0 **/IT* @@ -123,7 +123,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.graalvm.buildtools native-maven-plugin - 0.9.21 + 0.9.22 true com.example.firestore.NativeImageFirestoreSample diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 7285c226b0..306be986c0 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -21,7 +21,7 @@ 1.8 1.8 UTF-8 - 2.46.0 + 2.47.0 @@ -29,7 +29,7 @@ com.google.cloud google-cloud-firestore - 3.9.6 + 3.10.0 @@ -102,7 +102,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.4.0 add-snippets-source diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 29a1af14c5..e4a656dc74 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -21,7 +21,7 @@ 1.8 1.8 UTF-8 - 2.46.0 + 2.47.0 @@ -34,7 +34,7 @@ com.google.cloud libraries-bom - 26.13.0 + 26.14.0 pom import diff --git a/versions.txt b/versions.txt index 05fe2970f7..b5cfff67ab 100644 --- a/versions.txt +++ b/versions.txt @@ -1,11 +1,11 @@ # Format: # module:released-version:current-version -google-cloud-firestore:3.10.0:3.10.0 -google-cloud-firestore-admin:3.10.0:3.10.0 -google-cloud-firestore-bom:3.10.0:3.10.0 -grpc-google-cloud-firestore-admin-v1:3.10.0:3.10.0 -grpc-google-cloud-firestore-v1:3.10.0:3.10.0 -proto-google-cloud-firestore-admin-v1:3.10.0:3.10.0 -proto-google-cloud-firestore-v1:3.10.0:3.10.0 -proto-google-cloud-firestore-bundle-v1:3.10.0:3.10.0 +google-cloud-firestore:3.11.0:3.11.0 +google-cloud-firestore-admin:3.11.0:3.11.0 +google-cloud-firestore-bom:3.11.0:3.11.0 +grpc-google-cloud-firestore-admin-v1:3.11.0:3.11.0 +grpc-google-cloud-firestore-v1:3.11.0:3.11.0 +proto-google-cloud-firestore-admin-v1:3.11.0:3.11.0 +proto-google-cloud-firestore-v1:3.11.0:3.11.0 +proto-google-cloud-firestore-bundle-v1:3.11.0:3.11.0