Преглед на файлове

Upgrade gRPC-C++ to 1.28.0 (#4312)

This unblocks nanopb changes proposed in #4264.

This upgrades everything in the gRPC constellation of dependencies to match gRPC at 1.28:

  * gRPC to 1.28.0 (note that gRPC 1.28.1, while released, is a fix for just the python binding and there's no gRPC-C++ CocoaPod at that version)
  * Abseil to 20200225 (as of gRPC 1.27 this is now a gRPC dependency too; there's a later patch but gRPC doesn't use it yet)
  * Protobuf C++ to 3.11.4 (only used for testing in Firestore)
  * C-Ares to 1.15.0
  * BoringSSL to match (no change between gRPC 1.27.0 and 1.28.0)

Also, this disables CFStream-based transport on Apple platforms. This works around b/133182964, wherein CFStream will occasionally fail to raise a has-bytes-available events, causing Firestore to appear to hang.
Gil преди 6 години
родител
ревизия
a465c951bf
променени са 39 файла, в които са добавени 4802 реда и са изтрити 7126 реда
  1. 49 74
      CMakeLists.txt
  2. 2 2
      FirebaseFirestore.podspec
  3. 2 2
      Firestore/Example/ProtobufCpp.podspec
  4. 1 0
      Firestore/Example/Tests/Integration/FSTTransactionTests.mm
  5. 1 1
      Firestore/Protos/CMakeLists.txt
  6. 83 367
      Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc
  7. 172 75
      Firestore/Protos/cpp/firestore/local/maybe_document.pb.h
  8. 60 268
      Firestore/Protos/cpp/firestore/local/mutation.pb.cc
  9. 107 39
      Firestore/Protos/cpp/firestore/local/mutation.pb.h
  10. 80 355
      Firestore/Protos/cpp/firestore/local/target.pb.cc
  11. 195 65
      Firestore/Protos/cpp/firestore/local/target.pb.h
  12. 0 1
      Firestore/Protos/cpp/google/api/annotations.pb.cc
  13. 2 2
      Firestore/Protos/cpp/google/api/annotations.pb.h
  14. 133 566
      Firestore/Protos/cpp/google/api/http.pb.cc
  15. 255 128
      Firestore/Protos/cpp/google/api/http.pb.h
  16. 104 458
      Firestore/Protos/cpp/google/firestore/v1/common.pb.cc
  17. 166 97
      Firestore/Protos/cpp/google/firestore/v1/common.pb.h
  18. 119 537
      Firestore/Protos/cpp/google/firestore/v1/document.pb.cc
  19. 308 137
      Firestore/Protos/cpp/google/firestore/v1/document.pb.h
  20. 121 465
      Firestore/Protos/cpp/google/firestore/v1/firestore.pb.cc
  21. 338 133
      Firestore/Protos/cpp/google/firestore/v1/firestore.pb.h
  22. 110 479
      Firestore/Protos/cpp/google/firestore/v1/query.pb.cc
  23. 324 147
      Firestore/Protos/cpp/google/firestore/v1/query.pb.h
  24. 128 456
      Firestore/Protos/cpp/google/firestore/v1/write.pb.cc
  25. 331 134
      Firestore/Protos/cpp/google/firestore/v1/write.pb.h
  26. 32 144
      Firestore/Protos/cpp/google/rpc/status.pb.cc
  27. 53 20
      Firestore/Protos/cpp/google/rpc/status.pb.h
  28. 16 97
      Firestore/Protos/cpp/google/type/latlng.pb.cc
  29. 28 15
      Firestore/Protos/cpp/google/type/latlng.pb.h
  30. 17 0
      Firestore/core/src/remote/grpc_connection.cc
  31. 1420 1784
      Firestore/core/src/remote/grpc_root_certificates_generated.cc
  32. 2 1
      Firestore/core/test/unit/remote/grpc_stream_tester.cc
  33. 6 3
      cmake/external/CMakeLists.txt
  34. 2 2
      cmake/external/abseil-cpp.cmake
  35. 6 12
      cmake/external/boringssl.cmake
  36. 8 11
      cmake/external/c-ares.cmake
  37. 7 31
      cmake/external/grpc.cmake
  38. 8 12
      cmake/external/protobuf.cmake
  39. 6 6
      cmake/external/zlib.cmake

+ 49 - 74
CMakeLists.txt

@@ -132,33 +132,10 @@ if(FIREBASE_IOS_BUILD_BENCHMARKS)
 endif()
 
 
-# Abseil-cpp
+# gRPC
+
 # Force disable Abseil's tests, which don't compile under VS2017.
-set(old_build_testing ${BUILD_TESTING})
 set(ABSL_RUN_TESTS OFF CACHE BOOL "Disable Abseil tests" FORCE)
-add_external_subdirectory(abseil-cpp)
-
-if(CXX_CLANG)
-  target_compile_options(
-    absl_time_zone
-    PRIVATE
-      -Wno-unused-template
-      -Wno-shadow
-      -Wno-tautological-type-limit-compare
-  )
-endif()
-
-if(MSVC)
-  # Disable warnings about unsafe use of std::copy
-  target_compile_definitions(
-    absl_strings
-    PUBLIC
-      _SCL_SECURE_NO_WARNINGS=1
-  )
-endif()
-
-
-# gRPC
 
 # libcurl and c-ares conflict in their usage of this variable. Prevent
 # libcurl's setting of this variable from affecting the c-ares build that's
@@ -178,75 +155,74 @@ if(IOS OR ANDROID)
   set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Disabled")
 endif()
 
-if(NOT ANDROID AND NOT IOS)
+if(ANDROID OR IOS)
+  set(OPENSSL_FOUND FALSE)
+else()
   find_package(OpenSSL QUIET)
-  if(OPENSSL_FOUND)
-    set(gRPC_SSL_PROVIDER package CACHE STRING "Use external OpenSSL")
-  endif()
+endif()
+
+if(OPENSSL_FOUND)
+  set(gRPC_SSL_PROVIDER package CACHE STRING "Use external OpenSSL")
+else()
+  set(BORINGSSL_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/boringssl/src)
 endif()
 
 find_package(ZLIB QUIET)
 if(ZLIB_FOUND)
   set(gRPC_ZLIB_PROVIDER package CACHE STRING "Use external ZLIB")
+else()
+  set(ZLIB_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/zlib)
 endif()
 
 set(gRPC_BUILD_TESTS OFF CACHE BOOL "Disable gRPC tests")
+set(gRPC_BUILD_CODEGEN OFF CACHE BOOL "Disable gRPC codegen")
+set(gRPC_BUILD_CSHARP_EXT OFF CACHE BOOL "Disable gRPC C# extensions")
+set(gRPC_INSTALL OFF CACHE BOOL "Disable gRPC installation")
+
+set(ABSL_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/abseil-cpp)
+set(CARES_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/cares)
+set(PROTOBUF_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/protobuf)
+
 add_external_subdirectory(grpc)
 
-# Fix up targets included by gRPC's build
-if(OPENSSL_FOUND)
-  # gRPC's CMakeLists.txt does not account for finding OpenSSL in a directory
-  # that's not in the default search path.
-  target_include_directories(grpc PRIVATE ${OPENSSL_INCLUDE_DIR})
-
-  if(CXX_CLANG OR CXX_GNU)
-    if((OPENSSL_VERSION VERSION_EQUAL "1.1.0") OR
-       (OPENSSL_VERSION VERSION_GREATER "1.1.0"))
-      # gRPC uses some features deprecated in OpenSSL 1.1.0
-      target_compile_options(
-        grpc
-        PRIVATE -Wno-deprecated-declarations
-      )
-    endif()
-  endif()
 
-else()
+# Fix up targets included by gRPC
+if(CXX_CLANG)
+  target_compile_options(
+    absl_time_zone PRIVATE
+    -Wno-unused-template
+    -Wno-shadow
+    -Wno-tautological-type-limit-compare
+  )
+endif()
+
+if(MSVC)
+  # Disable warnings about unsafe use of std::copy
+  target_compile_definitions(
+    absl_strings PUBLIC
+    _SCL_SECURE_NO_WARNINGS=1
+  )
+endif()
+
+if(NOT OPENSSL_FOUND)
   # Not using outboard OpenSSL so set up BoringSSL to look like it.
   firebase_ios_add_alias(OpenSSL::Crypto crypto)
   target_include_directories(
-    crypto
-    INTERFACE
-      $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/grpc/third_party/boringssl/include>
+    crypto INTERFACE
+    $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/boringssl/src/include>
   )
 
   firebase_ios_add_alias(OpenSSL::SSL ssl)
   target_include_directories(
-    ssl
-    INTERFACE
-      $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/grpc/third_party/boringssl/include>
-  )
-endif()
-
-if(CXX_CLANG OR CXX_GNU)
-  target_compile_options(
-    libprotobuf
-    PUBLIC -Wno-unused-parameter
-  )
-endif()
-if(CXX_CLANG)
-  target_compile_options(
-    libprotobuf
-    PRIVATE
-      -Wno-inconsistent-missing-override
-      -Wno-invalid-offsetof
+    ssl INTERFACE
+    $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/boringssl/src/include>
   )
 endif()
 
-
 if(NOT ZLIB_FOUND)
   target_include_directories(
-    zlibstatic
-    INTERFACE $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/grpc/third_party/zlib>
+    zlibstatic INTERFACE
+    $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/grpc/third_party/zlib>
   )
 endif()
 
@@ -265,14 +241,13 @@ set(nanopb_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
 add_external_subdirectory(nanopb)
 
 target_compile_definitions(
-  protobuf-nanopb-static
-  PUBLIC -DPB_FIELD_32BIT -DPB_ENABLE_MALLOC
+  protobuf-nanopb-static PUBLIC
+  -DPB_FIELD_32BIT -DPB_ENABLE_MALLOC
 )
 
 # Enable #include <nanopb/pb.h>
 target_include_directories(
-  protobuf-nanopb-static
-  INTERFACE
+  protobuf-nanopb-static INTERFACE
   $<BUILD_INTERFACE:${FIREBASE_EXTERNAL_SOURCE_DIR}/nanopb>
 )
 

+ 2 - 2
FirebaseFirestore.podspec

@@ -61,7 +61,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
   s.dependency 'FirebaseAuthInterop', '~> 1.0'
   s.dependency 'FirebaseCore', '~> 6.2'
 
-  abseil_version = '0.20190808'
+  abseil_version = '0.20200225.0'
   s.dependency 'abseil/algorithm', abseil_version
   s.dependency 'abseil/base', abseil_version
   s.dependency 'abseil/memory', abseil_version
@@ -70,7 +70,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
   s.dependency 'abseil/time', abseil_version
   s.dependency 'abseil/types', abseil_version
 
-  s.dependency 'gRPC-C++', '0.0.9'
+  s.dependency 'gRPC-C++', '~> 1.28.0'
   s.dependency 'leveldb-library', '~> 1.22'
   s.dependency 'nanopb', '~> 0.3.901'
 

+ 2 - 2
Firestore/Example/ProtobufCpp.podspec

@@ -17,9 +17,9 @@
 
 Pod::Spec.new do |s|
   s.name             = 'ProtobufCpp'
-  s.version          = '3.9.2'
+  s.version          = '3.11.4'
   s.summary          = 'Protocol Buffers v.3 runtime library for C++.'
-  s.homepage         = 'https://github.com/google/protobuf'
+  s.homepage         = 'https://github.com/protocolbuffers/protobuf'
   s.license          = '3-Clause BSD License'
   s.authors          = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' }
   s.cocoapods_version = '>= 1.0'

+ 1 - 0
Firestore/Example/Tests/Integration/FSTTransactionTests.mm

@@ -234,6 +234,7 @@ TransactionStage get = ^(FIRTransaction *transaction, FIRDocumentReference *doc)
 }
 
 - (void)runFailingTransactionWithError:(FIRFirestoreErrorCode)expected {
+  (void)expected;
   XCTestExpectation *expectation =
       [_testCase expectationWithDescription:@"runFailingTransactionWithError"];
   [_db

+ 1 - 1
Firestore/Protos/CMakeLists.txt

@@ -138,7 +138,7 @@ target_link_libraries(
 )
 
 # Generate the python representation of descriptor.proto.
-set(PROTOBUF_DIR ${FIREBASE_BINARY_DIR}/external/src/grpc/third_party/protobuf)
+set(PROTOBUF_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/protobuf)
 set(PROTOBUF_PROTO ${PROTOBUF_DIR}/src/google/protobuf/descriptor.proto)
 set(PROTOBUF_PYTHON ${PROTOBUF_DIR}/python/google/protobuf/descriptor_pb2.py)
 

+ 83 - 367
Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc

@@ -21,7 +21,6 @@
 
 #include <algorithm>
 
-#include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/extension_set.h>
 #include <google/protobuf/wire_format_lite.h>
@@ -66,7 +65,7 @@ static void InitDefaultsscc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocum
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
       &scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
       &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
       &scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,}};
@@ -83,7 +82,7 @@ static void InitDefaultsscc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
       &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
 
 static void InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto() {
@@ -98,7 +97,7 @@ static void InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdoc
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
       &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
 
 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[3];
@@ -214,10 +213,10 @@ NoDocument::NoDocument(const NoDocument& from)
       _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
-  if (!from.name().empty()) {
+  if (!from._internal_name().empty()) {
     name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
   }
-  if (from.has_read_time()) {
+  if (from._internal_has_read_time()) {
     read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
   } else {
     read_time_ = nullptr;
@@ -264,7 +263,6 @@ void NoDocument::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* NoDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -275,14 +273,16 @@ const char* NoDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
       // string name = 1;
       case 1:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
-          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "firestore.client.NoDocument.name");
+          auto str = _internal_mutable_name();
+          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "firestore.client.NoDocument.name"));
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .google.protobuf.Timestamp read_time = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ctx->ParseMessage(mutable_read_time(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -305,95 +305,9 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool NoDocument::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:firestore.client.NoDocument)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // string name = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
-                input, this->mutable_name()));
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-            this->name().data(), static_cast<int>(this->name().length()),
-            ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
-            "firestore.client.NoDocument.name"));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.protobuf.Timestamp read_time = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_read_time()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:firestore.client.NoDocument)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:firestore.client.NoDocument)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void NoDocument::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:firestore.client.NoDocument)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // string name = 1;
-  if (this->name().size() > 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->name().data(), static_cast<int>(this->name().length()),
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
-      "firestore.client.NoDocument.name");
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
-      1, this->name(), output);
-  }
 
-  // .google.protobuf.Timestamp read_time = 2;
-  if (this->has_read_time()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, _Internal::read_time(this), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:firestore.client.NoDocument)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* NoDocument::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* NoDocument::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:firestore.client.NoDocument)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
@@ -401,24 +315,24 @@ void NoDocument::SerializeWithCachedSizes(
   // string name = 1;
   if (this->name().size() > 0) {
     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->name().data(), static_cast<int>(this->name().length()),
+      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
       "firestore.client.NoDocument.name");
-    target =
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
-        1, this->name(), target);
+    target = stream->WriteStringMaybeAliased(
+        1, this->_internal_name(), target);
   }
 
   // .google.protobuf.Timestamp read_time = 2;
   if (this->has_read_time()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, _Internal::read_time(this), target);
+      InternalWriteMessage(
+        2, _Internal::read_time(this), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:firestore.client.NoDocument)
   return target;
@@ -428,11 +342,6 @@ size_t NoDocument::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:firestore.client.NoDocument)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -441,7 +350,7 @@ size_t NoDocument::ByteSizeLong() const {
   if (this->name().size() > 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
-        this->name());
+        this->_internal_name());
   }
 
   // .google.protobuf.Timestamp read_time = 2;
@@ -451,6 +360,10 @@ size_t NoDocument::ByteSizeLong() const {
         *read_time_);
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -483,7 +396,7 @@ void NoDocument::MergeFrom(const NoDocument& from) {
     name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
   }
   if (from.has_read_time()) {
-    mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
+    _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
   }
 }
 
@@ -549,10 +462,10 @@ UnknownDocument::UnknownDocument(const UnknownDocument& from)
       _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
-  if (!from.name().empty()) {
+  if (!from._internal_name().empty()) {
     name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
   }
-  if (from.has_version()) {
+  if (from._internal_has_version()) {
     version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.version_);
   } else {
     version_ = nullptr;
@@ -599,7 +512,6 @@ void UnknownDocument::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* UnknownDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -610,14 +522,16 @@ const char* UnknownDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
       // string name = 1;
       case 1:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
-          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "firestore.client.UnknownDocument.name");
+          auto str = _internal_mutable_name();
+          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "firestore.client.UnknownDocument.name"));
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .google.protobuf.Timestamp version = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ctx->ParseMessage(mutable_version(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_version(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -640,95 +554,9 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool UnknownDocument::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:firestore.client.UnknownDocument)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // string name = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
-                input, this->mutable_name()));
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-            this->name().data(), static_cast<int>(this->name().length()),
-            ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
-            "firestore.client.UnknownDocument.name"));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.protobuf.Timestamp version = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_version()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:firestore.client.UnknownDocument)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:firestore.client.UnknownDocument)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void UnknownDocument::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:firestore.client.UnknownDocument)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // string name = 1;
-  if (this->name().size() > 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->name().data(), static_cast<int>(this->name().length()),
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
-      "firestore.client.UnknownDocument.name");
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
-      1, this->name(), output);
-  }
-
-  // .google.protobuf.Timestamp version = 2;
-  if (this->has_version()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, _Internal::version(this), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:firestore.client.UnknownDocument)
-}
 
-::PROTOBUF_NAMESPACE_ID::uint8* UnknownDocument::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* UnknownDocument::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:firestore.client.UnknownDocument)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
@@ -736,24 +564,24 @@ void UnknownDocument::SerializeWithCachedSizes(
   // string name = 1;
   if (this->name().size() > 0) {
     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->name().data(), static_cast<int>(this->name().length()),
+      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
       "firestore.client.UnknownDocument.name");
-    target =
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
-        1, this->name(), target);
+    target = stream->WriteStringMaybeAliased(
+        1, this->_internal_name(), target);
   }
 
   // .google.protobuf.Timestamp version = 2;
   if (this->has_version()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, _Internal::version(this), target);
+      InternalWriteMessage(
+        2, _Internal::version(this), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:firestore.client.UnknownDocument)
   return target;
@@ -763,11 +591,6 @@ size_t UnknownDocument::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:firestore.client.UnknownDocument)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -776,7 +599,7 @@ size_t UnknownDocument::ByteSizeLong() const {
   if (this->name().size() > 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
-        this->name());
+        this->_internal_name());
   }
 
   // .google.protobuf.Timestamp version = 2;
@@ -786,6 +609,10 @@ size_t UnknownDocument::ByteSizeLong() const {
         *version_);
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -818,7 +645,7 @@ void UnknownDocument::MergeFrom(const UnknownDocument& from) {
     name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
   }
   if (from.has_version()) {
-    mutable_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.version());
+    _internal_mutable_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_version());
   }
 }
 
@@ -911,7 +738,7 @@ void MaybeDocument::set_allocated_document(::google::firestore::v1::Document* do
   // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.document)
 }
 void MaybeDocument::clear_document() {
-  if (has_document()) {
+  if (_internal_has_document()) {
     delete document_type_.document_;
     clear_has_document_type();
   }
@@ -943,15 +770,15 @@ MaybeDocument::MaybeDocument(const MaybeDocument& from)
   clear_has_document_type();
   switch (from.document_type_case()) {
     case kNoDocument: {
-      mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from.no_document());
+      _internal_mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from._internal_no_document());
       break;
     }
     case kDocument: {
-      mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
+      _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
       break;
     }
     case kUnknownDocument: {
-      mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from.unknown_document());
+      _internal_mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from._internal_unknown_document());
       break;
     }
     case DOCUMENT_TYPE_NOT_SET: {
@@ -1021,7 +848,6 @@ void MaybeDocument::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* MaybeDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -1032,21 +858,21 @@ const char* MaybeDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_
       // .firestore.client.NoDocument no_document = 1;
       case 1:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
-          ptr = ctx->ParseMessage(mutable_no_document(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_no_document(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .google.firestore.v1.Document document = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ctx->ParseMessage(mutable_document(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .firestore.client.UnknownDocument unknown_document = 3;
       case 3:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
-          ptr = ctx->ParseMessage(mutable_unknown_document(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_unknown_document(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -1076,155 +902,46 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool MaybeDocument::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:firestore.client.MaybeDocument)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // .firestore.client.NoDocument no_document = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_no_document()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.firestore.v1.Document document = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_document()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .firestore.client.UnknownDocument unknown_document = 3;
-      case 3: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_unknown_document()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // bool has_committed_mutations = 4;
-      case 4: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
-                 input, &has_committed_mutations_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
 
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:firestore.client.MaybeDocument)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:firestore.client.MaybeDocument)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void MaybeDocument::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:firestore.client.MaybeDocument)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // .firestore.client.NoDocument no_document = 1;
-  if (has_no_document()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      1, _Internal::no_document(this), output);
-  }
-
-  // .google.firestore.v1.Document document = 2;
-  if (has_document()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, _Internal::document(this), output);
-  }
-
-  // .firestore.client.UnknownDocument unknown_document = 3;
-  if (has_unknown_document()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      3, _Internal::unknown_document(this), output);
-  }
-
-  // bool has_committed_mutations = 4;
-  if (this->has_committed_mutations() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->has_committed_mutations(), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:firestore.client.MaybeDocument)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* MaybeDocument::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* MaybeDocument::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:firestore.client.MaybeDocument)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // .firestore.client.NoDocument no_document = 1;
-  if (has_no_document()) {
+  if (_internal_has_no_document()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        1, _Internal::no_document(this), target);
+      InternalWriteMessage(
+        1, _Internal::no_document(this), target, stream);
   }
 
   // .google.firestore.v1.Document document = 2;
-  if (has_document()) {
+  if (_internal_has_document()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, _Internal::document(this), target);
+      InternalWriteMessage(
+        2, _Internal::document(this), target, stream);
   }
 
   // .firestore.client.UnknownDocument unknown_document = 3;
-  if (has_unknown_document()) {
+  if (_internal_has_unknown_document()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        3, _Internal::unknown_document(this), target);
+      InternalWriteMessage(
+        3, _Internal::unknown_document(this), target, stream);
   }
 
   // bool has_committed_mutations = 4;
   if (this->has_committed_mutations() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->has_committed_mutations(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_has_committed_mutations(), target);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:firestore.client.MaybeDocument)
   return target;
@@ -1234,11 +951,6 @@ size_t MaybeDocument::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:firestore.client.MaybeDocument)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -1274,6 +986,10 @@ size_t MaybeDocument::ByteSizeLong() const {
       break;
     }
   }
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -1302,19 +1018,19 @@ void MaybeDocument::MergeFrom(const MaybeDocument& from) {
   (void) cached_has_bits;
 
   if (from.has_committed_mutations() != 0) {
-    set_has_committed_mutations(from.has_committed_mutations());
+    _internal_set_has_committed_mutations(from._internal_has_committed_mutations());
   }
   switch (from.document_type_case()) {
     case kNoDocument: {
-      mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from.no_document());
+      _internal_mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from._internal_no_document());
       break;
     }
     case kDocument: {
-      mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
+      _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
       break;
     }
     case kUnknownDocument: {
-      mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from.unknown_document());
+      _internal_mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from._internal_unknown_document());
       break;
     }
     case DOCUMENT_TYPE_NOT_SET: {

+ 172 - 75
Firestore/Protos/cpp/firestore/local/maybe_document.pb.h

@@ -24,12 +24,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3009000
+#if PROTOBUF_VERSION < 3011000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.
@@ -164,16 +164,9 @@ class NoDocument :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -221,14 +214,26 @@ class NoDocument :
   std::string* mutable_name();
   std::string* release_name();
   void set_allocated_name(std::string* name);
+  private:
+  const std::string& _internal_name() const;
+  void _internal_set_name(const std::string& value);
+  std::string* _internal_mutable_name();
+  public:
 
   // .google.protobuf.Timestamp read_time = 2;
   bool has_read_time() const;
+  private:
+  bool _internal_has_read_time() const;
+  public:
   void clear_read_time();
   const PROTOBUF_NAMESPACE_ID::Timestamp& read_time() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_read_time();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_read_time();
   void set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_read_time() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_read_time();
+  public:
 
   // @@protoc_insertion_point(class_scope:firestore.client.NoDocument)
  private:
@@ -311,16 +316,9 @@ class UnknownDocument :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -368,14 +366,26 @@ class UnknownDocument :
   std::string* mutable_name();
   std::string* release_name();
   void set_allocated_name(std::string* name);
+  private:
+  const std::string& _internal_name() const;
+  void _internal_set_name(const std::string& value);
+  std::string* _internal_mutable_name();
+  public:
 
   // .google.protobuf.Timestamp version = 2;
   bool has_version() const;
+  private:
+  bool _internal_has_version() const;
+  public:
   void clear_version();
   const PROTOBUF_NAMESPACE_ID::Timestamp& version() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_version();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_version();
   void set_allocated_version(PROTOBUF_NAMESPACE_ID::Timestamp* version);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_version() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_version();
+  public:
 
   // @@protoc_insertion_point(class_scope:firestore.client.UnknownDocument)
  private:
@@ -465,16 +475,9 @@ class MaybeDocument :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -518,30 +521,55 @@ class MaybeDocument :
   void clear_has_committed_mutations();
   bool has_committed_mutations() const;
   void set_has_committed_mutations(bool value);
+  private:
+  bool _internal_has_committed_mutations() const;
+  void _internal_set_has_committed_mutations(bool value);
+  public:
 
   // .firestore.client.NoDocument no_document = 1;
   bool has_no_document() const;
+  private:
+  bool _internal_has_no_document() const;
+  public:
   void clear_no_document();
   const ::firestore::client::NoDocument& no_document() const;
   ::firestore::client::NoDocument* release_no_document();
   ::firestore::client::NoDocument* mutable_no_document();
   void set_allocated_no_document(::firestore::client::NoDocument* no_document);
+  private:
+  const ::firestore::client::NoDocument& _internal_no_document() const;
+  ::firestore::client::NoDocument* _internal_mutable_no_document();
+  public:
 
   // .google.firestore.v1.Document document = 2;
   bool has_document() const;
+  private:
+  bool _internal_has_document() const;
+  public:
   void clear_document();
   const ::google::firestore::v1::Document& document() const;
   ::google::firestore::v1::Document* release_document();
   ::google::firestore::v1::Document* mutable_document();
   void set_allocated_document(::google::firestore::v1::Document* document);
+  private:
+  const ::google::firestore::v1::Document& _internal_document() const;
+  ::google::firestore::v1::Document* _internal_mutable_document();
+  public:
 
   // .firestore.client.UnknownDocument unknown_document = 3;
   bool has_unknown_document() const;
+  private:
+  bool _internal_has_unknown_document() const;
+  public:
   void clear_unknown_document();
   const ::firestore::client::UnknownDocument& unknown_document() const;
   ::firestore::client::UnknownDocument* release_unknown_document();
   ::firestore::client::UnknownDocument* mutable_unknown_document();
   void set_allocated_unknown_document(::firestore::client::UnknownDocument* unknown_document);
+  private:
+  const ::firestore::client::UnknownDocument& _internal_unknown_document() const;
+  ::firestore::client::UnknownDocument* _internal_mutable_unknown_document();
+  public:
 
   void clear_document_type();
   DocumentTypeCase document_type_case() const;
@@ -585,12 +613,22 @@ inline void NoDocument::clear_name() {
 }
 inline const std::string& NoDocument::name() const {
   // @@protoc_insertion_point(field_get:firestore.client.NoDocument.name)
-  return name_.GetNoArena();
+  return _internal_name();
 }
 inline void NoDocument::set_name(const std::string& value) {
+  _internal_set_name(value);
+  // @@protoc_insertion_point(field_set:firestore.client.NoDocument.name)
+}
+inline std::string* NoDocument::mutable_name() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.name)
+  return _internal_mutable_name();
+}
+inline const std::string& NoDocument::_internal_name() const {
+  return name_.GetNoArena();
+}
+inline void NoDocument::_internal_set_name(const std::string& value) {
   
   name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:firestore.client.NoDocument.name)
 }
 inline void NoDocument::set_name(std::string&& value) {
   
@@ -610,9 +648,8 @@ inline void NoDocument::set_name(const char* value, size_t size) {
       ::std::string(reinterpret_cast<const char*>(value), size));
   // @@protoc_insertion_point(field_set_pointer:firestore.client.NoDocument.name)
 }
-inline std::string* NoDocument::mutable_name() {
+inline std::string* NoDocument::_internal_mutable_name() {
   
-  // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.name)
   return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
 }
 inline std::string* NoDocument::release_name() {
@@ -631,15 +668,21 @@ inline void NoDocument::set_allocated_name(std::string* name) {
 }
 
 // .google.protobuf.Timestamp read_time = 2;
-inline bool NoDocument::has_read_time() const {
+inline bool NoDocument::_internal_has_read_time() const {
   return this != internal_default_instance() && read_time_ != nullptr;
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& NoDocument::read_time() const {
+inline bool NoDocument::has_read_time() const {
+  return _internal_has_read_time();
+}
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& NoDocument::_internal_read_time() const {
   const PROTOBUF_NAMESPACE_ID::Timestamp* p = read_time_;
-  // @@protoc_insertion_point(field_get:firestore.client.NoDocument.read_time)
   return p != nullptr ? *p : *reinterpret_cast<const PROTOBUF_NAMESPACE_ID::Timestamp*>(
       &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& NoDocument::read_time() const {
+  // @@protoc_insertion_point(field_get:firestore.client.NoDocument.read_time)
+  return _internal_read_time();
+}
 inline PROTOBUF_NAMESPACE_ID::Timestamp* NoDocument::release_read_time() {
   // @@protoc_insertion_point(field_release:firestore.client.NoDocument.read_time)
   
@@ -647,15 +690,18 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* NoDocument::release_read_time() {
   read_time_ = nullptr;
   return temp;
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* NoDocument::mutable_read_time() {
+inline PROTOBUF_NAMESPACE_ID::Timestamp* NoDocument::_internal_mutable_read_time() {
   
   if (read_time_ == nullptr) {
     auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaNoVirtual());
     read_time_ = p;
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.read_time)
   return read_time_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* NoDocument::mutable_read_time() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.read_time)
+  return _internal_mutable_read_time();
+}
 inline void NoDocument::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
   if (message_arena == nullptr) {
@@ -686,12 +732,22 @@ inline void UnknownDocument::clear_name() {
 }
 inline const std::string& UnknownDocument::name() const {
   // @@protoc_insertion_point(field_get:firestore.client.UnknownDocument.name)
-  return name_.GetNoArena();
+  return _internal_name();
 }
 inline void UnknownDocument::set_name(const std::string& value) {
+  _internal_set_name(value);
+  // @@protoc_insertion_point(field_set:firestore.client.UnknownDocument.name)
+}
+inline std::string* UnknownDocument::mutable_name() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.UnknownDocument.name)
+  return _internal_mutable_name();
+}
+inline const std::string& UnknownDocument::_internal_name() const {
+  return name_.GetNoArena();
+}
+inline void UnknownDocument::_internal_set_name(const std::string& value) {
   
   name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:firestore.client.UnknownDocument.name)
 }
 inline void UnknownDocument::set_name(std::string&& value) {
   
@@ -711,9 +767,8 @@ inline void UnknownDocument::set_name(const char* value, size_t size) {
       ::std::string(reinterpret_cast<const char*>(value), size));
   // @@protoc_insertion_point(field_set_pointer:firestore.client.UnknownDocument.name)
 }
-inline std::string* UnknownDocument::mutable_name() {
+inline std::string* UnknownDocument::_internal_mutable_name() {
   
-  // @@protoc_insertion_point(field_mutable:firestore.client.UnknownDocument.name)
   return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
 }
 inline std::string* UnknownDocument::release_name() {
@@ -732,15 +787,21 @@ inline void UnknownDocument::set_allocated_name(std::string* name) {
 }
 
 // .google.protobuf.Timestamp version = 2;
-inline bool UnknownDocument::has_version() const {
+inline bool UnknownDocument::_internal_has_version() const {
   return this != internal_default_instance() && version_ != nullptr;
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& UnknownDocument::version() const {
+inline bool UnknownDocument::has_version() const {
+  return _internal_has_version();
+}
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& UnknownDocument::_internal_version() const {
   const PROTOBUF_NAMESPACE_ID::Timestamp* p = version_;
-  // @@protoc_insertion_point(field_get:firestore.client.UnknownDocument.version)
   return p != nullptr ? *p : *reinterpret_cast<const PROTOBUF_NAMESPACE_ID::Timestamp*>(
       &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& UnknownDocument::version() const {
+  // @@protoc_insertion_point(field_get:firestore.client.UnknownDocument.version)
+  return _internal_version();
+}
 inline PROTOBUF_NAMESPACE_ID::Timestamp* UnknownDocument::release_version() {
   // @@protoc_insertion_point(field_release:firestore.client.UnknownDocument.version)
   
@@ -748,15 +809,18 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* UnknownDocument::release_version() {
   version_ = nullptr;
   return temp;
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* UnknownDocument::mutable_version() {
+inline PROTOBUF_NAMESPACE_ID::Timestamp* UnknownDocument::_internal_mutable_version() {
   
   if (version_ == nullptr) {
     auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaNoVirtual());
     version_ = p;
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.UnknownDocument.version)
   return version_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* UnknownDocument::mutable_version() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.UnknownDocument.version)
+  return _internal_mutable_version();
+}
 inline void UnknownDocument::set_allocated_version(PROTOBUF_NAMESPACE_ID::Timestamp* version) {
   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
   if (message_arena == nullptr) {
@@ -782,21 +846,24 @@ inline void UnknownDocument::set_allocated_version(PROTOBUF_NAMESPACE_ID::Timest
 // MaybeDocument
 
 // .firestore.client.NoDocument no_document = 1;
-inline bool MaybeDocument::has_no_document() const {
+inline bool MaybeDocument::_internal_has_no_document() const {
   return document_type_case() == kNoDocument;
 }
+inline bool MaybeDocument::has_no_document() const {
+  return _internal_has_no_document();
+}
 inline void MaybeDocument::set_has_no_document() {
   _oneof_case_[0] = kNoDocument;
 }
 inline void MaybeDocument::clear_no_document() {
-  if (has_no_document()) {
+  if (_internal_has_no_document()) {
     delete document_type_.no_document_;
     clear_has_document_type();
   }
 }
 inline ::firestore::client::NoDocument* MaybeDocument::release_no_document() {
   // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.no_document)
-  if (has_no_document()) {
+  if (_internal_has_no_document()) {
     clear_has_document_type();
       ::firestore::client::NoDocument* temp = document_type_.no_document_;
     document_type_.no_document_ = nullptr;
@@ -805,33 +872,42 @@ inline ::firestore::client::NoDocument* MaybeDocument::release_no_document() {
     return nullptr;
   }
 }
-inline const ::firestore::client::NoDocument& MaybeDocument::no_document() const {
-  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.no_document)
-  return has_no_document()
+inline const ::firestore::client::NoDocument& MaybeDocument::_internal_no_document() const {
+  return _internal_has_no_document()
       ? *document_type_.no_document_
       : *reinterpret_cast< ::firestore::client::NoDocument*>(&::firestore::client::_NoDocument_default_instance_);
 }
-inline ::firestore::client::NoDocument* MaybeDocument::mutable_no_document() {
-  if (!has_no_document()) {
+inline const ::firestore::client::NoDocument& MaybeDocument::no_document() const {
+  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.no_document)
+  return _internal_no_document();
+}
+inline ::firestore::client::NoDocument* MaybeDocument::_internal_mutable_no_document() {
+  if (!_internal_has_no_document()) {
     clear_document_type();
     set_has_no_document();
     document_type_.no_document_ = CreateMaybeMessage< ::firestore::client::NoDocument >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.no_document)
   return document_type_.no_document_;
 }
+inline ::firestore::client::NoDocument* MaybeDocument::mutable_no_document() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.no_document)
+  return _internal_mutable_no_document();
+}
 
 // .google.firestore.v1.Document document = 2;
-inline bool MaybeDocument::has_document() const {
+inline bool MaybeDocument::_internal_has_document() const {
   return document_type_case() == kDocument;
 }
+inline bool MaybeDocument::has_document() const {
+  return _internal_has_document();
+}
 inline void MaybeDocument::set_has_document() {
   _oneof_case_[0] = kDocument;
 }
 inline ::google::firestore::v1::Document* MaybeDocument::release_document() {
   // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.document)
-  if (has_document()) {
+  if (_internal_has_document()) {
     clear_has_document_type();
       ::google::firestore::v1::Document* temp = document_type_.document_;
     document_type_.document_ = nullptr;
@@ -840,39 +916,48 @@ inline ::google::firestore::v1::Document* MaybeDocument::release_document() {
     return nullptr;
   }
 }
-inline const ::google::firestore::v1::Document& MaybeDocument::document() const {
-  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.document)
-  return has_document()
+inline const ::google::firestore::v1::Document& MaybeDocument::_internal_document() const {
+  return _internal_has_document()
       ? *document_type_.document_
       : *reinterpret_cast< ::google::firestore::v1::Document*>(&::google::firestore::v1::_Document_default_instance_);
 }
-inline ::google::firestore::v1::Document* MaybeDocument::mutable_document() {
-  if (!has_document()) {
+inline const ::google::firestore::v1::Document& MaybeDocument::document() const {
+  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.document)
+  return _internal_document();
+}
+inline ::google::firestore::v1::Document* MaybeDocument::_internal_mutable_document() {
+  if (!_internal_has_document()) {
     clear_document_type();
     set_has_document();
     document_type_.document_ = CreateMaybeMessage< ::google::firestore::v1::Document >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.document)
   return document_type_.document_;
 }
+inline ::google::firestore::v1::Document* MaybeDocument::mutable_document() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.document)
+  return _internal_mutable_document();
+}
 
 // .firestore.client.UnknownDocument unknown_document = 3;
-inline bool MaybeDocument::has_unknown_document() const {
+inline bool MaybeDocument::_internal_has_unknown_document() const {
   return document_type_case() == kUnknownDocument;
 }
+inline bool MaybeDocument::has_unknown_document() const {
+  return _internal_has_unknown_document();
+}
 inline void MaybeDocument::set_has_unknown_document() {
   _oneof_case_[0] = kUnknownDocument;
 }
 inline void MaybeDocument::clear_unknown_document() {
-  if (has_unknown_document()) {
+  if (_internal_has_unknown_document()) {
     delete document_type_.unknown_document_;
     clear_has_document_type();
   }
 }
 inline ::firestore::client::UnknownDocument* MaybeDocument::release_unknown_document() {
   // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.unknown_document)
-  if (has_unknown_document()) {
+  if (_internal_has_unknown_document()) {
     clear_has_document_type();
       ::firestore::client::UnknownDocument* temp = document_type_.unknown_document_;
     document_type_.unknown_document_ = nullptr;
@@ -881,34 +966,46 @@ inline ::firestore::client::UnknownDocument* MaybeDocument::release_unknown_docu
     return nullptr;
   }
 }
-inline const ::firestore::client::UnknownDocument& MaybeDocument::unknown_document() const {
-  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.unknown_document)
-  return has_unknown_document()
+inline const ::firestore::client::UnknownDocument& MaybeDocument::_internal_unknown_document() const {
+  return _internal_has_unknown_document()
       ? *document_type_.unknown_document_
       : *reinterpret_cast< ::firestore::client::UnknownDocument*>(&::firestore::client::_UnknownDocument_default_instance_);
 }
-inline ::firestore::client::UnknownDocument* MaybeDocument::mutable_unknown_document() {
-  if (!has_unknown_document()) {
+inline const ::firestore::client::UnknownDocument& MaybeDocument::unknown_document() const {
+  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.unknown_document)
+  return _internal_unknown_document();
+}
+inline ::firestore::client::UnknownDocument* MaybeDocument::_internal_mutable_unknown_document() {
+  if (!_internal_has_unknown_document()) {
     clear_document_type();
     set_has_unknown_document();
     document_type_.unknown_document_ = CreateMaybeMessage< ::firestore::client::UnknownDocument >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.unknown_document)
   return document_type_.unknown_document_;
 }
+inline ::firestore::client::UnknownDocument* MaybeDocument::mutable_unknown_document() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.unknown_document)
+  return _internal_mutable_unknown_document();
+}
 
 // bool has_committed_mutations = 4;
 inline void MaybeDocument::clear_has_committed_mutations() {
   has_committed_mutations_ = false;
 }
+inline bool MaybeDocument::_internal_has_committed_mutations() const {
+  return has_committed_mutations_;
+}
 inline bool MaybeDocument::has_committed_mutations() const {
   // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.has_committed_mutations)
-  return has_committed_mutations_;
+  return _internal_has_committed_mutations();
 }
-inline void MaybeDocument::set_has_committed_mutations(bool value) {
+inline void MaybeDocument::_internal_set_has_committed_mutations(bool value) {
   
   has_committed_mutations_ = value;
+}
+inline void MaybeDocument::set_has_committed_mutations(bool value) {
+  _internal_set_has_committed_mutations(value);
   // @@protoc_insertion_point(field_set:firestore.client.MaybeDocument.has_committed_mutations)
 }
 

+ 60 - 268
Firestore/Protos/cpp/firestore/local/mutation.pb.cc

@@ -21,7 +21,6 @@
 
 #include <algorithm>
 
-#include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/extension_set.h>
 #include <google/protobuf/wire_format_lite.h>
@@ -57,7 +56,7 @@ static void InitDefaultsscc_info_MutationQueue_firestore_2flocal_2fmutation_2epr
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MutationQueue_firestore_2flocal_2fmutation_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MutationQueue_firestore_2flocal_2fmutation_2eproto}, {}};
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MutationQueue_firestore_2flocal_2fmutation_2eproto}, {}};
 
 static void InitDefaultsscc_info_WriteBatch_firestore_2flocal_2fmutation_2eproto() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
@@ -71,7 +70,7 @@ static void InitDefaultsscc_info_WriteBatch_firestore_2flocal_2fmutation_2eproto
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteBatch_firestore_2flocal_2fmutation_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_WriteBatch_firestore_2flocal_2fmutation_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_WriteBatch_firestore_2flocal_2fmutation_2eproto}, {
       &scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base,
       &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
 
@@ -160,7 +159,7 @@ MutationQueue::MutationQueue(const MutationQueue& from)
       _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   last_stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
-  if (!from.last_stream_token().empty()) {
+  if (!from._internal_last_stream_token().empty()) {
     last_stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.last_stream_token_);
   }
   last_acknowledged_batch_id_ = from.last_acknowledged_batch_id_;
@@ -202,7 +201,6 @@ void MutationQueue::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* MutationQueue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -220,7 +218,8 @@ const char* MutationQueue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_
       // bytes last_stream_token = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_last_stream_token(), ptr, ctx);
+          auto str = _internal_mutable_last_stream_token();
+          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -243,107 +242,28 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool MutationQueue::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:firestore.client.MutationQueue)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // int32 last_acknowledged_batch_id = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
-                 input, &last_acknowledged_batch_id_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // bytes last_stream_token = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
-                input, this->mutable_last_stream_token()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:firestore.client.MutationQueue)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:firestore.client.MutationQueue)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void MutationQueue::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:firestore.client.MutationQueue)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // int32 last_acknowledged_batch_id = 1;
-  if (this->last_acknowledged_batch_id() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->last_acknowledged_batch_id(), output);
-  }
-
-  // bytes last_stream_token = 2;
-  if (this->last_stream_token().size() > 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
-      2, this->last_stream_token(), output);
-  }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:firestore.client.MutationQueue)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* MutationQueue::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* MutationQueue::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:firestore.client.MutationQueue)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // int32 last_acknowledged_batch_id = 1;
   if (this->last_acknowledged_batch_id() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->last_acknowledged_batch_id(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_last_acknowledged_batch_id(), target);
   }
 
   // bytes last_stream_token = 2;
   if (this->last_stream_token().size() > 0) {
-    target =
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
-        2, this->last_stream_token(), target);
+    target = stream->WriteBytesMaybeAliased(
+        2, this->_internal_last_stream_token(), target);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:firestore.client.MutationQueue)
   return target;
@@ -353,11 +273,6 @@ size_t MutationQueue::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:firestore.client.MutationQueue)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -366,16 +281,20 @@ size_t MutationQueue::ByteSizeLong() const {
   if (this->last_stream_token().size() > 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
-        this->last_stream_token());
+        this->_internal_last_stream_token());
   }
 
   // int32 last_acknowledged_batch_id = 1;
   if (this->last_acknowledged_batch_id() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
-        this->last_acknowledged_batch_id());
+        this->_internal_last_acknowledged_batch_id());
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -408,7 +327,7 @@ void MutationQueue::MergeFrom(const MutationQueue& from) {
     last_stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.last_stream_token_);
   }
   if (from.last_acknowledged_batch_id() != 0) {
-    set_last_acknowledged_batch_id(from.last_acknowledged_batch_id());
+    _internal_set_last_acknowledged_batch_id(from._internal_last_acknowledged_batch_id());
   }
 }
 
@@ -481,7 +400,7 @@ WriteBatch::WriteBatch(const WriteBatch& from)
       writes_(from.writes_),
       base_writes_(from.base_writes_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
-  if (from.has_local_write_time()) {
+  if (from._internal_has_local_write_time()) {
     local_write_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.local_write_time_);
   } else {
     local_write_time_ = nullptr;
@@ -531,7 +450,6 @@ void WriteBatch::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* WriteBatch::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -552,16 +470,16 @@ const char* WriteBatch::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
           ptr -= 1;
           do {
             ptr += 1;
-            ptr = ctx->ParseMessage(add_writes(), ptr);
+            ptr = ctx->ParseMessage(_internal_add_writes(), ptr);
             CHK_(ptr);
             if (!ctx->DataAvailable(ptr)) break;
-          } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
+          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
         } else goto handle_unusual;
         continue;
       // .google.protobuf.Timestamp local_write_time = 3;
       case 3:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
-          ptr = ctx->ParseMessage(mutable_local_write_time(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_local_write_time(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -571,10 +489,10 @@ const char* WriteBatch::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
           ptr -= 1;
           do {
             ptr += 1;
-            ptr = ctx->ParseMessage(add_base_writes(), ptr);
+            ptr = ctx->ParseMessage(_internal_add_base_writes(), ptr);
             CHK_(ptr);
             if (!ctx->DataAvailable(ptr)) break;
-          } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34);
+          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
         } else goto handle_unusual;
         continue;
       default: {
@@ -596,163 +514,46 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool WriteBatch::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:firestore.client.WriteBatch)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // int32 batch_id = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
-                 input, &batch_id_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
 
-      // repeated .google.firestore.v1.Write writes = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-                input, add_writes()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.protobuf.Timestamp local_write_time = 3;
-      case 3: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_local_write_time()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // repeated .google.firestore.v1.Write base_writes = 4;
-      case 4: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-                input, add_base_writes()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:firestore.client.WriteBatch)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:firestore.client.WriteBatch)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void WriteBatch::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:firestore.client.WriteBatch)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // int32 batch_id = 1;
-  if (this->batch_id() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->batch_id(), output);
-  }
-
-  // repeated .google.firestore.v1.Write writes = 2;
-  for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2,
-      this->writes(static_cast<int>(i)),
-      output);
-  }
-
-  // .google.protobuf.Timestamp local_write_time = 3;
-  if (this->has_local_write_time()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      3, _Internal::local_write_time(this), output);
-  }
-
-  // repeated .google.firestore.v1.Write base_writes = 4;
-  for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->base_writes_size()); i < n; i++) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      4,
-      this->base_writes(static_cast<int>(i)),
-      output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:firestore.client.WriteBatch)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* WriteBatch::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* WriteBatch::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:firestore.client.WriteBatch)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // int32 batch_id = 1;
   if (this->batch_id() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->batch_id(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_batch_id(), target);
   }
 
   // repeated .google.firestore.v1.Write writes = 2;
   for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
+      n = static_cast<unsigned int>(this->_internal_writes_size()); i < n; i++) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, this->writes(static_cast<int>(i)), target);
+      InternalWriteMessage(2, this->_internal_writes(i), target, stream);
   }
 
   // .google.protobuf.Timestamp local_write_time = 3;
   if (this->has_local_write_time()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        3, _Internal::local_write_time(this), target);
+      InternalWriteMessage(
+        3, _Internal::local_write_time(this), target, stream);
   }
 
   // repeated .google.firestore.v1.Write base_writes = 4;
   for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->base_writes_size()); i < n; i++) {
+      n = static_cast<unsigned int>(this->_internal_base_writes_size()); i < n; i++) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        4, this->base_writes(static_cast<int>(i)), target);
+      InternalWriteMessage(4, this->_internal_base_writes(i), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:firestore.client.WriteBatch)
   return target;
@@ -762,35 +563,22 @@ size_t WriteBatch::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:firestore.client.WriteBatch)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
 
   // repeated .google.firestore.v1.Write writes = 2;
-  {
-    unsigned int count = static_cast<unsigned int>(this->writes_size());
-    total_size += 1UL * count;
-    for (unsigned int i = 0; i < count; i++) {
-      total_size +=
-        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
-          this->writes(static_cast<int>(i)));
-    }
+  total_size += 1UL * this->_internal_writes_size();
+  for (const auto& msg : this->writes_) {
+    total_size +=
+      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
   }
 
   // repeated .google.firestore.v1.Write base_writes = 4;
-  {
-    unsigned int count = static_cast<unsigned int>(this->base_writes_size());
-    total_size += 1UL * count;
-    for (unsigned int i = 0; i < count; i++) {
-      total_size +=
-        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
-          this->base_writes(static_cast<int>(i)));
-    }
+  total_size += 1UL * this->_internal_base_writes_size();
+  for (const auto& msg : this->base_writes_) {
+    total_size +=
+      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
   }
 
   // .google.protobuf.Timestamp local_write_time = 3;
@@ -804,9 +592,13 @@ size_t WriteBatch::ByteSizeLong() const {
   if (this->batch_id() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
-        this->batch_id());
+        this->_internal_batch_id());
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -837,10 +629,10 @@ void WriteBatch::MergeFrom(const WriteBatch& from) {
   writes_.MergeFrom(from.writes_);
   base_writes_.MergeFrom(from.base_writes_);
   if (from.has_local_write_time()) {
-    mutable_local_write_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.local_write_time());
+    _internal_mutable_local_write_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_local_write_time());
   }
   if (from.batch_id() != 0) {
-    set_batch_id(from.batch_id());
+    _internal_set_batch_id(from._internal_batch_id());
   }
 }
 
@@ -865,8 +657,8 @@ bool WriteBatch::IsInitialized() const {
 void WriteBatch::InternalSwap(WriteBatch* other) {
   using std::swap;
   _internal_metadata_.Swap(&other->_internal_metadata_);
-  CastToBase(&writes_)->InternalSwap(CastToBase(&other->writes_));
-  CastToBase(&base_writes_)->InternalSwap(CastToBase(&other->base_writes_));
+  writes_.InternalSwap(&other->writes_);
+  base_writes_.InternalSwap(&other->base_writes_);
   swap(local_write_time_, other->local_write_time_);
   swap(batch_id_, other->batch_id_);
 }

+ 107 - 39
Firestore/Protos/cpp/firestore/local/mutation.pb.h

@@ -24,12 +24,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3009000
+#if PROTOBUF_VERSION < 3011000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.
@@ -160,16 +160,9 @@ class MutationQueue :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -217,11 +210,20 @@ class MutationQueue :
   std::string* mutable_last_stream_token();
   std::string* release_last_stream_token();
   void set_allocated_last_stream_token(std::string* last_stream_token);
+  private:
+  const std::string& _internal_last_stream_token() const;
+  void _internal_set_last_stream_token(const std::string& value);
+  std::string* _internal_mutable_last_stream_token();
+  public:
 
   // int32 last_acknowledged_batch_id = 1;
   void clear_last_acknowledged_batch_id();
   ::PROTOBUF_NAMESPACE_ID::int32 last_acknowledged_batch_id() const;
   void set_last_acknowledged_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int32 _internal_last_acknowledged_batch_id() const;
+  void _internal_set_last_acknowledged_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  public:
 
   // @@protoc_insertion_point(class_scope:firestore.client.MutationQueue)
  private:
@@ -304,16 +306,9 @@ class WriteBatch :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -355,10 +350,17 @@ class WriteBatch :
   };
   // repeated .google.firestore.v1.Write writes = 2;
   int writes_size() const;
+  private:
+  int _internal_writes_size() const;
+  public:
   void clear_writes();
   ::google::firestore::v1::Write* mutable_writes(int index);
   ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::google::firestore::v1::Write >*
       mutable_writes();
+  private:
+  const ::google::firestore::v1::Write& _internal_writes(int index) const;
+  ::google::firestore::v1::Write* _internal_add_writes();
+  public:
   const ::google::firestore::v1::Write& writes(int index) const;
   ::google::firestore::v1::Write* add_writes();
   const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::google::firestore::v1::Write >&
@@ -366,10 +368,17 @@ class WriteBatch :
 
   // repeated .google.firestore.v1.Write base_writes = 4;
   int base_writes_size() const;
+  private:
+  int _internal_base_writes_size() const;
+  public:
   void clear_base_writes();
   ::google::firestore::v1::Write* mutable_base_writes(int index);
   ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::google::firestore::v1::Write >*
       mutable_base_writes();
+  private:
+  const ::google::firestore::v1::Write& _internal_base_writes(int index) const;
+  ::google::firestore::v1::Write* _internal_add_base_writes();
+  public:
   const ::google::firestore::v1::Write& base_writes(int index) const;
   ::google::firestore::v1::Write* add_base_writes();
   const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::google::firestore::v1::Write >&
@@ -377,16 +386,27 @@ class WriteBatch :
 
   // .google.protobuf.Timestamp local_write_time = 3;
   bool has_local_write_time() const;
+  private:
+  bool _internal_has_local_write_time() const;
+  public:
   void clear_local_write_time();
   const PROTOBUF_NAMESPACE_ID::Timestamp& local_write_time() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_local_write_time();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_local_write_time();
   void set_allocated_local_write_time(PROTOBUF_NAMESPACE_ID::Timestamp* local_write_time);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_local_write_time() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_local_write_time();
+  public:
 
   // int32 batch_id = 1;
   void clear_batch_id();
   ::PROTOBUF_NAMESPACE_ID::int32 batch_id() const;
   void set_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int32 _internal_batch_id() const;
+  void _internal_set_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  public:
 
   // @@protoc_insertion_point(class_scope:firestore.client.WriteBatch)
  private:
@@ -415,13 +435,19 @@ class WriteBatch :
 inline void MutationQueue::clear_last_acknowledged_batch_id() {
   last_acknowledged_batch_id_ = 0;
 }
+inline ::PROTOBUF_NAMESPACE_ID::int32 MutationQueue::_internal_last_acknowledged_batch_id() const {
+  return last_acknowledged_batch_id_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int32 MutationQueue::last_acknowledged_batch_id() const {
   // @@protoc_insertion_point(field_get:firestore.client.MutationQueue.last_acknowledged_batch_id)
-  return last_acknowledged_batch_id_;
+  return _internal_last_acknowledged_batch_id();
 }
-inline void MutationQueue::set_last_acknowledged_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void MutationQueue::_internal_set_last_acknowledged_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
   
   last_acknowledged_batch_id_ = value;
+}
+inline void MutationQueue::set_last_acknowledged_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+  _internal_set_last_acknowledged_batch_id(value);
   // @@protoc_insertion_point(field_set:firestore.client.MutationQueue.last_acknowledged_batch_id)
 }
 
@@ -431,12 +457,22 @@ inline void MutationQueue::clear_last_stream_token() {
 }
 inline const std::string& MutationQueue::last_stream_token() const {
   // @@protoc_insertion_point(field_get:firestore.client.MutationQueue.last_stream_token)
-  return last_stream_token_.GetNoArena();
+  return _internal_last_stream_token();
 }
 inline void MutationQueue::set_last_stream_token(const std::string& value) {
+  _internal_set_last_stream_token(value);
+  // @@protoc_insertion_point(field_set:firestore.client.MutationQueue.last_stream_token)
+}
+inline std::string* MutationQueue::mutable_last_stream_token() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.MutationQueue.last_stream_token)
+  return _internal_mutable_last_stream_token();
+}
+inline const std::string& MutationQueue::_internal_last_stream_token() const {
+  return last_stream_token_.GetNoArena();
+}
+inline void MutationQueue::_internal_set_last_stream_token(const std::string& value) {
   
   last_stream_token_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:firestore.client.MutationQueue.last_stream_token)
 }
 inline void MutationQueue::set_last_stream_token(std::string&& value) {
   
@@ -456,9 +492,8 @@ inline void MutationQueue::set_last_stream_token(const void* value, size_t size)
       ::std::string(reinterpret_cast<const char*>(value), size));
   // @@protoc_insertion_point(field_set_pointer:firestore.client.MutationQueue.last_stream_token)
 }
-inline std::string* MutationQueue::mutable_last_stream_token() {
+inline std::string* MutationQueue::_internal_mutable_last_stream_token() {
   
-  // @@protoc_insertion_point(field_mutable:firestore.client.MutationQueue.last_stream_token)
   return last_stream_token_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
 }
 inline std::string* MutationQueue::release_last_stream_token() {
@@ -484,20 +519,29 @@ inline void MutationQueue::set_allocated_last_stream_token(std::string* last_str
 inline void WriteBatch::clear_batch_id() {
   batch_id_ = 0;
 }
+inline ::PROTOBUF_NAMESPACE_ID::int32 WriteBatch::_internal_batch_id() const {
+  return batch_id_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int32 WriteBatch::batch_id() const {
   // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.batch_id)
-  return batch_id_;
+  return _internal_batch_id();
 }
-inline void WriteBatch::set_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void WriteBatch::_internal_set_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
   
   batch_id_ = value;
+}
+inline void WriteBatch::set_batch_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+  _internal_set_batch_id(value);
   // @@protoc_insertion_point(field_set:firestore.client.WriteBatch.batch_id)
 }
 
 // repeated .google.firestore.v1.Write writes = 2;
-inline int WriteBatch::writes_size() const {
+inline int WriteBatch::_internal_writes_size() const {
   return writes_.size();
 }
+inline int WriteBatch::writes_size() const {
+  return _internal_writes_size();
+}
 inline ::google::firestore::v1::Write* WriteBatch::mutable_writes(int index) {
   // @@protoc_insertion_point(field_mutable:firestore.client.WriteBatch.writes)
   return writes_.Mutable(index);
@@ -507,13 +551,19 @@ WriteBatch::mutable_writes() {
   // @@protoc_insertion_point(field_mutable_list:firestore.client.WriteBatch.writes)
   return &writes_;
 }
+inline const ::google::firestore::v1::Write& WriteBatch::_internal_writes(int index) const {
+  return writes_.Get(index);
+}
 inline const ::google::firestore::v1::Write& WriteBatch::writes(int index) const {
   // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.writes)
-  return writes_.Get(index);
+  return _internal_writes(index);
+}
+inline ::google::firestore::v1::Write* WriteBatch::_internal_add_writes() {
+  return writes_.Add();
 }
 inline ::google::firestore::v1::Write* WriteBatch::add_writes() {
   // @@protoc_insertion_point(field_add:firestore.client.WriteBatch.writes)
-  return writes_.Add();
+  return _internal_add_writes();
 }
 inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::google::firestore::v1::Write >&
 WriteBatch::writes() const {
@@ -522,15 +572,21 @@ WriteBatch::writes() const {
 }
 
 // .google.protobuf.Timestamp local_write_time = 3;
-inline bool WriteBatch::has_local_write_time() const {
+inline bool WriteBatch::_internal_has_local_write_time() const {
   return this != internal_default_instance() && local_write_time_ != nullptr;
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& WriteBatch::local_write_time() const {
+inline bool WriteBatch::has_local_write_time() const {
+  return _internal_has_local_write_time();
+}
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& WriteBatch::_internal_local_write_time() const {
   const PROTOBUF_NAMESPACE_ID::Timestamp* p = local_write_time_;
-  // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.local_write_time)
   return p != nullptr ? *p : *reinterpret_cast<const PROTOBUF_NAMESPACE_ID::Timestamp*>(
       &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& WriteBatch::local_write_time() const {
+  // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.local_write_time)
+  return _internal_local_write_time();
+}
 inline PROTOBUF_NAMESPACE_ID::Timestamp* WriteBatch::release_local_write_time() {
   // @@protoc_insertion_point(field_release:firestore.client.WriteBatch.local_write_time)
   
@@ -538,15 +594,18 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* WriteBatch::release_local_write_time()
   local_write_time_ = nullptr;
   return temp;
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* WriteBatch::mutable_local_write_time() {
+inline PROTOBUF_NAMESPACE_ID::Timestamp* WriteBatch::_internal_mutable_local_write_time() {
   
   if (local_write_time_ == nullptr) {
     auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaNoVirtual());
     local_write_time_ = p;
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.WriteBatch.local_write_time)
   return local_write_time_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* WriteBatch::mutable_local_write_time() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.WriteBatch.local_write_time)
+  return _internal_mutable_local_write_time();
+}
 inline void WriteBatch::set_allocated_local_write_time(PROTOBUF_NAMESPACE_ID::Timestamp* local_write_time) {
   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
   if (message_arena == nullptr) {
@@ -568,9 +627,12 @@ inline void WriteBatch::set_allocated_local_write_time(PROTOBUF_NAMESPACE_ID::Ti
 }
 
 // repeated .google.firestore.v1.Write base_writes = 4;
-inline int WriteBatch::base_writes_size() const {
+inline int WriteBatch::_internal_base_writes_size() const {
   return base_writes_.size();
 }
+inline int WriteBatch::base_writes_size() const {
+  return _internal_base_writes_size();
+}
 inline ::google::firestore::v1::Write* WriteBatch::mutable_base_writes(int index) {
   // @@protoc_insertion_point(field_mutable:firestore.client.WriteBatch.base_writes)
   return base_writes_.Mutable(index);
@@ -580,13 +642,19 @@ WriteBatch::mutable_base_writes() {
   // @@protoc_insertion_point(field_mutable_list:firestore.client.WriteBatch.base_writes)
   return &base_writes_;
 }
+inline const ::google::firestore::v1::Write& WriteBatch::_internal_base_writes(int index) const {
+  return base_writes_.Get(index);
+}
 inline const ::google::firestore::v1::Write& WriteBatch::base_writes(int index) const {
   // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.base_writes)
-  return base_writes_.Get(index);
+  return _internal_base_writes(index);
+}
+inline ::google::firestore::v1::Write* WriteBatch::_internal_add_base_writes() {
+  return base_writes_.Add();
 }
 inline ::google::firestore::v1::Write* WriteBatch::add_base_writes() {
   // @@protoc_insertion_point(field_add:firestore.client.WriteBatch.base_writes)
-  return base_writes_.Add();
+  return _internal_add_base_writes();
 }
 inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::google::firestore::v1::Write >&
 WriteBatch::base_writes() const {

+ 80 - 355
Firestore/Protos/cpp/firestore/local/target.pb.cc

@@ -21,7 +21,6 @@
 
 #include <algorithm>
 
-#include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/extension_set.h>
 #include <google/protobuf/wire_format_lite.h>
@@ -60,7 +59,7 @@ static void InitDefaultsscc_info_Target_firestore_2flocal_2ftarget_2eproto() {
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Target_firestore_2flocal_2ftarget_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Target_firestore_2flocal_2ftarget_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_Target_firestore_2flocal_2ftarget_2eproto}, {
       &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,
       &scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
       &scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,}};
@@ -77,7 +76,7 @@ static void InitDefaultsscc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto}, {
       &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
 
 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_firestore_2flocal_2ftarget_2eproto[2];
@@ -217,7 +216,7 @@ void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* qu
   // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.query)
 }
 void Target::clear_query() {
-  if (has_query()) {
+  if (_internal_has_query()) {
     delete target_type_.query_;
     clear_has_target_type();
   }
@@ -237,7 +236,7 @@ void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTa
   // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.documents)
 }
 void Target::clear_documents() {
-  if (has_documents()) {
+  if (_internal_has_documents()) {
     delete target_type_.documents_;
     clear_has_target_type();
   }
@@ -258,15 +257,15 @@ Target::Target(const Target& from)
       _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   resume_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
-  if (!from.resume_token().empty()) {
+  if (!from._internal_resume_token().empty()) {
     resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
   }
-  if (from.has_snapshot_version()) {
+  if (from._internal_has_snapshot_version()) {
     snapshot_version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.snapshot_version_);
   } else {
     snapshot_version_ = nullptr;
   }
-  if (from.has_last_limbo_free_snapshot_version()) {
+  if (from._internal_has_last_limbo_free_snapshot_version()) {
     last_limbo_free_snapshot_version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.last_limbo_free_snapshot_version_);
   } else {
     last_limbo_free_snapshot_version_ = nullptr;
@@ -277,11 +276,11 @@ Target::Target(const Target& from)
   clear_has_target_type();
   switch (from.target_type_case()) {
     case kQuery: {
-      mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query());
+      _internal_mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from._internal_query());
       break;
     }
     case kDocuments: {
-      mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents());
+      _internal_mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from._internal_documents());
       break;
     }
     case TARGET_TYPE_NOT_SET: {
@@ -364,7 +363,6 @@ void Target::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* Target::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -382,14 +380,15 @@ const char* Target::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
       // .google.protobuf.Timestamp snapshot_version = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ctx->ParseMessage(mutable_snapshot_version(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_snapshot_version(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // bytes resume_token = 3;
       case 3:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
-          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_resume_token(), ptr, ctx);
+          auto str = _internal_mutable_resume_token();
+          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -403,21 +402,21 @@ const char* Target::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
       // .google.firestore.v1.Target.QueryTarget query = 5;
       case 5:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
-          ptr = ctx->ParseMessage(mutable_query(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_query(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .google.firestore.v1.Target.DocumentsTarget documents = 6;
       case 6:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
-          ptr = ctx->ParseMessage(mutable_documents(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_documents(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
       case 7:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
-          ptr = ctx->ParseMessage(mutable_last_limbo_free_snapshot_version(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_last_limbo_free_snapshot_version(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -440,226 +439,66 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool Target::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:firestore.client.Target)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // int32 target_id = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
-                 input, &target_id_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.protobuf.Timestamp snapshot_version = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_snapshot_version()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // bytes resume_token = 3;
-      case 3: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
-                input, this->mutable_resume_token()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // int64 last_listen_sequence_number = 4;
-      case 4: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
-                 input, &last_listen_sequence_number_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.firestore.v1.Target.QueryTarget query = 5;
-      case 5: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_query()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.firestore.v1.Target.DocumentsTarget documents = 6;
-      case 6: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_documents()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
-      case 7: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_last_limbo_free_snapshot_version()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:firestore.client.Target)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:firestore.client.Target)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void Target::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:firestore.client.Target)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // int32 target_id = 1;
-  if (this->target_id() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->target_id(), output);
-  }
 
-  // .google.protobuf.Timestamp snapshot_version = 2;
-  if (this->has_snapshot_version()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, _Internal::snapshot_version(this), output);
-  }
-
-  // bytes resume_token = 3;
-  if (this->resume_token().size() > 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
-      3, this->resume_token(), output);
-  }
-
-  // int64 last_listen_sequence_number = 4;
-  if (this->last_listen_sequence_number() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->last_listen_sequence_number(), output);
-  }
-
-  // .google.firestore.v1.Target.QueryTarget query = 5;
-  if (has_query()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      5, _Internal::query(this), output);
-  }
-
-  // .google.firestore.v1.Target.DocumentsTarget documents = 6;
-  if (has_documents()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      6, _Internal::documents(this), output);
-  }
-
-  // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
-  if (this->has_last_limbo_free_snapshot_version()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      7, _Internal::last_limbo_free_snapshot_version(this), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:firestore.client.Target)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* Target::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* Target::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:firestore.client.Target)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // int32 target_id = 1;
   if (this->target_id() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->target_id(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_target_id(), target);
   }
 
   // .google.protobuf.Timestamp snapshot_version = 2;
   if (this->has_snapshot_version()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, _Internal::snapshot_version(this), target);
+      InternalWriteMessage(
+        2, _Internal::snapshot_version(this), target, stream);
   }
 
   // bytes resume_token = 3;
   if (this->resume_token().size() > 0) {
-    target =
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
-        3, this->resume_token(), target);
+    target = stream->WriteBytesMaybeAliased(
+        3, this->_internal_resume_token(), target);
   }
 
   // int64 last_listen_sequence_number = 4;
   if (this->last_listen_sequence_number() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->last_listen_sequence_number(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_last_listen_sequence_number(), target);
   }
 
   // .google.firestore.v1.Target.QueryTarget query = 5;
-  if (has_query()) {
+  if (_internal_has_query()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        5, _Internal::query(this), target);
+      InternalWriteMessage(
+        5, _Internal::query(this), target, stream);
   }
 
   // .google.firestore.v1.Target.DocumentsTarget documents = 6;
-  if (has_documents()) {
+  if (_internal_has_documents()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        6, _Internal::documents(this), target);
+      InternalWriteMessage(
+        6, _Internal::documents(this), target, stream);
   }
 
   // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
   if (this->has_last_limbo_free_snapshot_version()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        7, _Internal::last_limbo_free_snapshot_version(this), target);
+      InternalWriteMessage(
+        7, _Internal::last_limbo_free_snapshot_version(this), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:firestore.client.Target)
   return target;
@@ -669,11 +508,6 @@ size_t Target::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:firestore.client.Target)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -682,7 +516,7 @@ size_t Target::ByteSizeLong() const {
   if (this->resume_token().size() > 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
-        this->resume_token());
+        this->_internal_resume_token());
   }
 
   // .google.protobuf.Timestamp snapshot_version = 2;
@@ -703,14 +537,14 @@ size_t Target::ByteSizeLong() const {
   if (this->last_listen_sequence_number() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
-        this->last_listen_sequence_number());
+        this->_internal_last_listen_sequence_number());
   }
 
   // int32 target_id = 1;
   if (this->target_id() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
-        this->target_id());
+        this->_internal_target_id());
   }
 
   switch (target_type_case()) {
@@ -732,6 +566,10 @@ size_t Target::ByteSizeLong() const {
       break;
     }
   }
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -764,24 +602,24 @@ void Target::MergeFrom(const Target& from) {
     resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
   }
   if (from.has_snapshot_version()) {
-    mutable_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.snapshot_version());
+    _internal_mutable_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_snapshot_version());
   }
   if (from.has_last_limbo_free_snapshot_version()) {
-    mutable_last_limbo_free_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.last_limbo_free_snapshot_version());
+    _internal_mutable_last_limbo_free_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_last_limbo_free_snapshot_version());
   }
   if (from.last_listen_sequence_number() != 0) {
-    set_last_listen_sequence_number(from.last_listen_sequence_number());
+    _internal_set_last_listen_sequence_number(from._internal_last_listen_sequence_number());
   }
   if (from.target_id() != 0) {
-    set_target_id(from.target_id());
+    _internal_set_target_id(from._internal_target_id());
   }
   switch (from.target_type_case()) {
     case kQuery: {
-      mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query());
+      _internal_mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from._internal_query());
       break;
     }
     case kDocuments: {
-      mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents());
+      _internal_mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from._internal_documents());
       break;
     }
     case TARGET_TYPE_NOT_SET: {
@@ -856,7 +694,7 @@ TargetGlobal::TargetGlobal(const TargetGlobal& from)
   : ::PROTOBUF_NAMESPACE_ID::Message(),
       _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
-  if (from.has_last_remote_snapshot_version()) {
+  if (from._internal_has_last_remote_snapshot_version()) {
     last_remote_snapshot_version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.last_remote_snapshot_version_);
   } else {
     last_remote_snapshot_version_ = nullptr;
@@ -908,7 +746,6 @@ void TargetGlobal::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* TargetGlobal::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -933,7 +770,7 @@ const char* TargetGlobal::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
       // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
       case 3:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
-          ptr = ctx->ParseMessage(mutable_last_remote_snapshot_version(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_last_remote_snapshot_version(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -963,153 +800,42 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool TargetGlobal::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:firestore.client.TargetGlobal)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // int32 highest_target_id = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
-                 input, &highest_target_id_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // int64 highest_listen_sequence_number = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
-                 input, &highest_listen_sequence_number_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
-      case 3: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_last_remote_snapshot_version()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // int32 target_count = 4;
-      case 4: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
-                 input, &target_count_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
 
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:firestore.client.TargetGlobal)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:firestore.client.TargetGlobal)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void TargetGlobal::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:firestore.client.TargetGlobal)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // int32 highest_target_id = 1;
-  if (this->highest_target_id() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->highest_target_id(), output);
-  }
-
-  // int64 highest_listen_sequence_number = 2;
-  if (this->highest_listen_sequence_number() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->highest_listen_sequence_number(), output);
-  }
-
-  // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
-  if (this->has_last_remote_snapshot_version()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      3, _Internal::last_remote_snapshot_version(this), output);
-  }
-
-  // int32 target_count = 4;
-  if (this->target_count() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->target_count(), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:firestore.client.TargetGlobal)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* TargetGlobal::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* TargetGlobal::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:firestore.client.TargetGlobal)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // int32 highest_target_id = 1;
   if (this->highest_target_id() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->highest_target_id(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_highest_target_id(), target);
   }
 
   // int64 highest_listen_sequence_number = 2;
   if (this->highest_listen_sequence_number() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->highest_listen_sequence_number(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_highest_listen_sequence_number(), target);
   }
 
   // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
   if (this->has_last_remote_snapshot_version()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        3, _Internal::last_remote_snapshot_version(this), target);
+      InternalWriteMessage(
+        3, _Internal::last_remote_snapshot_version(this), target, stream);
   }
 
   // int32 target_count = 4;
   if (this->target_count() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->target_count(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_target_count(), target);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:firestore.client.TargetGlobal)
   return target;
@@ -1119,11 +845,6 @@ size_t TargetGlobal::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:firestore.client.TargetGlobal)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -1139,23 +860,27 @@ size_t TargetGlobal::ByteSizeLong() const {
   if (this->highest_listen_sequence_number() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
-        this->highest_listen_sequence_number());
+        this->_internal_highest_listen_sequence_number());
   }
 
   // int32 highest_target_id = 1;
   if (this->highest_target_id() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
-        this->highest_target_id());
+        this->_internal_highest_target_id());
   }
 
   // int32 target_count = 4;
   if (this->target_count() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
-        this->target_count());
+        this->_internal_target_count());
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -1184,16 +909,16 @@ void TargetGlobal::MergeFrom(const TargetGlobal& from) {
   (void) cached_has_bits;
 
   if (from.has_last_remote_snapshot_version()) {
-    mutable_last_remote_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.last_remote_snapshot_version());
+    _internal_mutable_last_remote_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_last_remote_snapshot_version());
   }
   if (from.highest_listen_sequence_number() != 0) {
-    set_highest_listen_sequence_number(from.highest_listen_sequence_number());
+    _internal_set_highest_listen_sequence_number(from._internal_highest_listen_sequence_number());
   }
   if (from.highest_target_id() != 0) {
-    set_highest_target_id(from.highest_target_id());
+    _internal_set_highest_target_id(from._internal_highest_target_id());
   }
   if (from.target_count() != 0) {
-    set_target_count(from.target_count());
+    _internal_set_target_count(from._internal_target_count());
   }
 }
 

+ 195 - 65
Firestore/Protos/cpp/firestore/local/target.pb.h

@@ -24,12 +24,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3009000
+#if PROTOBUF_VERSION < 3011000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.
@@ -166,16 +166,9 @@ class Target :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -228,48 +221,89 @@ class Target :
   std::string* mutable_resume_token();
   std::string* release_resume_token();
   void set_allocated_resume_token(std::string* resume_token);
+  private:
+  const std::string& _internal_resume_token() const;
+  void _internal_set_resume_token(const std::string& value);
+  std::string* _internal_mutable_resume_token();
+  public:
 
   // .google.protobuf.Timestamp snapshot_version = 2;
   bool has_snapshot_version() const;
+  private:
+  bool _internal_has_snapshot_version() const;
+  public:
   void clear_snapshot_version();
   const PROTOBUF_NAMESPACE_ID::Timestamp& snapshot_version() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_snapshot_version();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_snapshot_version();
   void set_allocated_snapshot_version(PROTOBUF_NAMESPACE_ID::Timestamp* snapshot_version);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_snapshot_version() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_snapshot_version();
+  public:
 
   // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
   bool has_last_limbo_free_snapshot_version() const;
+  private:
+  bool _internal_has_last_limbo_free_snapshot_version() const;
+  public:
   void clear_last_limbo_free_snapshot_version();
   const PROTOBUF_NAMESPACE_ID::Timestamp& last_limbo_free_snapshot_version() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_last_limbo_free_snapshot_version();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_last_limbo_free_snapshot_version();
   void set_allocated_last_limbo_free_snapshot_version(PROTOBUF_NAMESPACE_ID::Timestamp* last_limbo_free_snapshot_version);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_last_limbo_free_snapshot_version() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_last_limbo_free_snapshot_version();
+  public:
 
   // int64 last_listen_sequence_number = 4;
   void clear_last_listen_sequence_number();
   ::PROTOBUF_NAMESPACE_ID::int64 last_listen_sequence_number() const;
   void set_last_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int64 _internal_last_listen_sequence_number() const;
+  void _internal_set_last_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value);
+  public:
 
   // int32 target_id = 1;
   void clear_target_id();
   ::PROTOBUF_NAMESPACE_ID::int32 target_id() const;
   void set_target_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int32 _internal_target_id() const;
+  void _internal_set_target_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  public:
 
   // .google.firestore.v1.Target.QueryTarget query = 5;
   bool has_query() const;
+  private:
+  bool _internal_has_query() const;
+  public:
   void clear_query();
   const ::google::firestore::v1::Target_QueryTarget& query() const;
   ::google::firestore::v1::Target_QueryTarget* release_query();
   ::google::firestore::v1::Target_QueryTarget* mutable_query();
   void set_allocated_query(::google::firestore::v1::Target_QueryTarget* query);
+  private:
+  const ::google::firestore::v1::Target_QueryTarget& _internal_query() const;
+  ::google::firestore::v1::Target_QueryTarget* _internal_mutable_query();
+  public:
 
   // .google.firestore.v1.Target.DocumentsTarget documents = 6;
   bool has_documents() const;
+  private:
+  bool _internal_has_documents() const;
+  public:
   void clear_documents();
   const ::google::firestore::v1::Target_DocumentsTarget& documents() const;
   ::google::firestore::v1::Target_DocumentsTarget* release_documents();
   ::google::firestore::v1::Target_DocumentsTarget* mutable_documents();
   void set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents);
+  private:
+  const ::google::firestore::v1::Target_DocumentsTarget& _internal_documents() const;
+  ::google::firestore::v1::Target_DocumentsTarget* _internal_mutable_documents();
+  public:
 
   void clear_target_type();
   TargetTypeCase target_type_case() const;
@@ -369,16 +403,9 @@ class TargetGlobal :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -420,26 +447,45 @@ class TargetGlobal :
   };
   // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
   bool has_last_remote_snapshot_version() const;
+  private:
+  bool _internal_has_last_remote_snapshot_version() const;
+  public:
   void clear_last_remote_snapshot_version();
   const PROTOBUF_NAMESPACE_ID::Timestamp& last_remote_snapshot_version() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_last_remote_snapshot_version();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_last_remote_snapshot_version();
   void set_allocated_last_remote_snapshot_version(PROTOBUF_NAMESPACE_ID::Timestamp* last_remote_snapshot_version);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_last_remote_snapshot_version() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_last_remote_snapshot_version();
+  public:
 
   // int64 highest_listen_sequence_number = 2;
   void clear_highest_listen_sequence_number();
   ::PROTOBUF_NAMESPACE_ID::int64 highest_listen_sequence_number() const;
   void set_highest_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int64 _internal_highest_listen_sequence_number() const;
+  void _internal_set_highest_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value);
+  public:
 
   // int32 highest_target_id = 1;
   void clear_highest_target_id();
   ::PROTOBUF_NAMESPACE_ID::int32 highest_target_id() const;
   void set_highest_target_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int32 _internal_highest_target_id() const;
+  void _internal_set_highest_target_id(::PROTOBUF_NAMESPACE_ID::int32 value);
+  public:
 
   // int32 target_count = 4;
   void clear_target_count();
   ::PROTOBUF_NAMESPACE_ID::int32 target_count() const;
   void set_target_count(::PROTOBUF_NAMESPACE_ID::int32 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int32 _internal_target_count() const;
+  void _internal_set_target_count(::PROTOBUF_NAMESPACE_ID::int32 value);
+  public:
 
   // @@protoc_insertion_point(class_scope:firestore.client.TargetGlobal)
  private:
@@ -468,26 +514,38 @@ class TargetGlobal :
 inline void Target::clear_target_id() {
   target_id_ = 0;
 }
+inline ::PROTOBUF_NAMESPACE_ID::int32 Target::_internal_target_id() const {
+  return target_id_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int32 Target::target_id() const {
   // @@protoc_insertion_point(field_get:firestore.client.Target.target_id)
-  return target_id_;
+  return _internal_target_id();
 }
-inline void Target::set_target_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Target::_internal_set_target_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
   
   target_id_ = value;
+}
+inline void Target::set_target_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+  _internal_set_target_id(value);
   // @@protoc_insertion_point(field_set:firestore.client.Target.target_id)
 }
 
 // .google.protobuf.Timestamp snapshot_version = 2;
-inline bool Target::has_snapshot_version() const {
+inline bool Target::_internal_has_snapshot_version() const {
   return this != internal_default_instance() && snapshot_version_ != nullptr;
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& Target::snapshot_version() const {
+inline bool Target::has_snapshot_version() const {
+  return _internal_has_snapshot_version();
+}
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& Target::_internal_snapshot_version() const {
   const PROTOBUF_NAMESPACE_ID::Timestamp* p = snapshot_version_;
-  // @@protoc_insertion_point(field_get:firestore.client.Target.snapshot_version)
   return p != nullptr ? *p : *reinterpret_cast<const PROTOBUF_NAMESPACE_ID::Timestamp*>(
       &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& Target::snapshot_version() const {
+  // @@protoc_insertion_point(field_get:firestore.client.Target.snapshot_version)
+  return _internal_snapshot_version();
+}
 inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::release_snapshot_version() {
   // @@protoc_insertion_point(field_release:firestore.client.Target.snapshot_version)
   
@@ -495,15 +553,18 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::release_snapshot_version() {
   snapshot_version_ = nullptr;
   return temp;
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::mutable_snapshot_version() {
+inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::_internal_mutable_snapshot_version() {
   
   if (snapshot_version_ == nullptr) {
     auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaNoVirtual());
     snapshot_version_ = p;
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.Target.snapshot_version)
   return snapshot_version_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::mutable_snapshot_version() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.Target.snapshot_version)
+  return _internal_mutable_snapshot_version();
+}
 inline void Target::set_allocated_snapshot_version(PROTOBUF_NAMESPACE_ID::Timestamp* snapshot_version) {
   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
   if (message_arena == nullptr) {
@@ -530,12 +591,22 @@ inline void Target::clear_resume_token() {
 }
 inline const std::string& Target::resume_token() const {
   // @@protoc_insertion_point(field_get:firestore.client.Target.resume_token)
-  return resume_token_.GetNoArena();
+  return _internal_resume_token();
 }
 inline void Target::set_resume_token(const std::string& value) {
+  _internal_set_resume_token(value);
+  // @@protoc_insertion_point(field_set:firestore.client.Target.resume_token)
+}
+inline std::string* Target::mutable_resume_token() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.Target.resume_token)
+  return _internal_mutable_resume_token();
+}
+inline const std::string& Target::_internal_resume_token() const {
+  return resume_token_.GetNoArena();
+}
+inline void Target::_internal_set_resume_token(const std::string& value) {
   
   resume_token_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:firestore.client.Target.resume_token)
 }
 inline void Target::set_resume_token(std::string&& value) {
   
@@ -555,9 +626,8 @@ inline void Target::set_resume_token(const void* value, size_t size) {
       ::std::string(reinterpret_cast<const char*>(value), size));
   // @@protoc_insertion_point(field_set_pointer:firestore.client.Target.resume_token)
 }
-inline std::string* Target::mutable_resume_token() {
+inline std::string* Target::_internal_mutable_resume_token() {
   
-  // @@protoc_insertion_point(field_mutable:firestore.client.Target.resume_token)
   return resume_token_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
 }
 inline std::string* Target::release_resume_token() {
@@ -579,26 +649,35 @@ inline void Target::set_allocated_resume_token(std::string* resume_token) {
 inline void Target::clear_last_listen_sequence_number() {
   last_listen_sequence_number_ = PROTOBUF_LONGLONG(0);
 }
+inline ::PROTOBUF_NAMESPACE_ID::int64 Target::_internal_last_listen_sequence_number() const {
+  return last_listen_sequence_number_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int64 Target::last_listen_sequence_number() const {
   // @@protoc_insertion_point(field_get:firestore.client.Target.last_listen_sequence_number)
-  return last_listen_sequence_number_;
+  return _internal_last_listen_sequence_number();
 }
-inline void Target::set_last_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void Target::_internal_set_last_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value) {
   
   last_listen_sequence_number_ = value;
+}
+inline void Target::set_last_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value) {
+  _internal_set_last_listen_sequence_number(value);
   // @@protoc_insertion_point(field_set:firestore.client.Target.last_listen_sequence_number)
 }
 
 // .google.firestore.v1.Target.QueryTarget query = 5;
-inline bool Target::has_query() const {
+inline bool Target::_internal_has_query() const {
   return target_type_case() == kQuery;
 }
+inline bool Target::has_query() const {
+  return _internal_has_query();
+}
 inline void Target::set_has_query() {
   _oneof_case_[0] = kQuery;
 }
 inline ::google::firestore::v1::Target_QueryTarget* Target::release_query() {
   // @@protoc_insertion_point(field_release:firestore.client.Target.query)
-  if (has_query()) {
+  if (_internal_has_query()) {
     clear_has_target_type();
       ::google::firestore::v1::Target_QueryTarget* temp = target_type_.query_;
     target_type_.query_ = nullptr;
@@ -607,33 +686,42 @@ inline ::google::firestore::v1::Target_QueryTarget* Target::release_query() {
     return nullptr;
   }
 }
-inline const ::google::firestore::v1::Target_QueryTarget& Target::query() const {
-  // @@protoc_insertion_point(field_get:firestore.client.Target.query)
-  return has_query()
+inline const ::google::firestore::v1::Target_QueryTarget& Target::_internal_query() const {
+  return _internal_has_query()
       ? *target_type_.query_
       : *reinterpret_cast< ::google::firestore::v1::Target_QueryTarget*>(&::google::firestore::v1::_Target_QueryTarget_default_instance_);
 }
-inline ::google::firestore::v1::Target_QueryTarget* Target::mutable_query() {
-  if (!has_query()) {
+inline const ::google::firestore::v1::Target_QueryTarget& Target::query() const {
+  // @@protoc_insertion_point(field_get:firestore.client.Target.query)
+  return _internal_query();
+}
+inline ::google::firestore::v1::Target_QueryTarget* Target::_internal_mutable_query() {
+  if (!_internal_has_query()) {
     clear_target_type();
     set_has_query();
     target_type_.query_ = CreateMaybeMessage< ::google::firestore::v1::Target_QueryTarget >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.Target.query)
   return target_type_.query_;
 }
+inline ::google::firestore::v1::Target_QueryTarget* Target::mutable_query() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.Target.query)
+  return _internal_mutable_query();
+}
 
 // .google.firestore.v1.Target.DocumentsTarget documents = 6;
-inline bool Target::has_documents() const {
+inline bool Target::_internal_has_documents() const {
   return target_type_case() == kDocuments;
 }
+inline bool Target::has_documents() const {
+  return _internal_has_documents();
+}
 inline void Target::set_has_documents() {
   _oneof_case_[0] = kDocuments;
 }
 inline ::google::firestore::v1::Target_DocumentsTarget* Target::release_documents() {
   // @@protoc_insertion_point(field_release:firestore.client.Target.documents)
-  if (has_documents()) {
+  if (_internal_has_documents()) {
     clear_has_target_type();
       ::google::firestore::v1::Target_DocumentsTarget* temp = target_type_.documents_;
     target_type_.documents_ = nullptr;
@@ -642,33 +730,45 @@ inline ::google::firestore::v1::Target_DocumentsTarget* Target::release_document
     return nullptr;
   }
 }
-inline const ::google::firestore::v1::Target_DocumentsTarget& Target::documents() const {
-  // @@protoc_insertion_point(field_get:firestore.client.Target.documents)
-  return has_documents()
+inline const ::google::firestore::v1::Target_DocumentsTarget& Target::_internal_documents() const {
+  return _internal_has_documents()
       ? *target_type_.documents_
       : *reinterpret_cast< ::google::firestore::v1::Target_DocumentsTarget*>(&::google::firestore::v1::_Target_DocumentsTarget_default_instance_);
 }
-inline ::google::firestore::v1::Target_DocumentsTarget* Target::mutable_documents() {
-  if (!has_documents()) {
+inline const ::google::firestore::v1::Target_DocumentsTarget& Target::documents() const {
+  // @@protoc_insertion_point(field_get:firestore.client.Target.documents)
+  return _internal_documents();
+}
+inline ::google::firestore::v1::Target_DocumentsTarget* Target::_internal_mutable_documents() {
+  if (!_internal_has_documents()) {
     clear_target_type();
     set_has_documents();
     target_type_.documents_ = CreateMaybeMessage< ::google::firestore::v1::Target_DocumentsTarget >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.Target.documents)
   return target_type_.documents_;
 }
+inline ::google::firestore::v1::Target_DocumentsTarget* Target::mutable_documents() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.Target.documents)
+  return _internal_mutable_documents();
+}
 
 // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
-inline bool Target::has_last_limbo_free_snapshot_version() const {
+inline bool Target::_internal_has_last_limbo_free_snapshot_version() const {
   return this != internal_default_instance() && last_limbo_free_snapshot_version_ != nullptr;
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& Target::last_limbo_free_snapshot_version() const {
+inline bool Target::has_last_limbo_free_snapshot_version() const {
+  return _internal_has_last_limbo_free_snapshot_version();
+}
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& Target::_internal_last_limbo_free_snapshot_version() const {
   const PROTOBUF_NAMESPACE_ID::Timestamp* p = last_limbo_free_snapshot_version_;
-  // @@protoc_insertion_point(field_get:firestore.client.Target.last_limbo_free_snapshot_version)
   return p != nullptr ? *p : *reinterpret_cast<const PROTOBUF_NAMESPACE_ID::Timestamp*>(
       &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& Target::last_limbo_free_snapshot_version() const {
+  // @@protoc_insertion_point(field_get:firestore.client.Target.last_limbo_free_snapshot_version)
+  return _internal_last_limbo_free_snapshot_version();
+}
 inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::release_last_limbo_free_snapshot_version() {
   // @@protoc_insertion_point(field_release:firestore.client.Target.last_limbo_free_snapshot_version)
   
@@ -676,15 +776,18 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::release_last_limbo_free_snapsho
   last_limbo_free_snapshot_version_ = nullptr;
   return temp;
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::mutable_last_limbo_free_snapshot_version() {
+inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::_internal_mutable_last_limbo_free_snapshot_version() {
   
   if (last_limbo_free_snapshot_version_ == nullptr) {
     auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaNoVirtual());
     last_limbo_free_snapshot_version_ = p;
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.Target.last_limbo_free_snapshot_version)
   return last_limbo_free_snapshot_version_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* Target::mutable_last_limbo_free_snapshot_version() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.Target.last_limbo_free_snapshot_version)
+  return _internal_mutable_last_limbo_free_snapshot_version();
+}
 inline void Target::set_allocated_last_limbo_free_snapshot_version(PROTOBUF_NAMESPACE_ID::Timestamp* last_limbo_free_snapshot_version) {
   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
   if (message_arena == nullptr) {
@@ -722,13 +825,19 @@ inline Target::TargetTypeCase Target::target_type_case() const {
 inline void TargetGlobal::clear_highest_target_id() {
   highest_target_id_ = 0;
 }
+inline ::PROTOBUF_NAMESPACE_ID::int32 TargetGlobal::_internal_highest_target_id() const {
+  return highest_target_id_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int32 TargetGlobal::highest_target_id() const {
   // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.highest_target_id)
-  return highest_target_id_;
+  return _internal_highest_target_id();
 }
-inline void TargetGlobal::set_highest_target_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void TargetGlobal::_internal_set_highest_target_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
   
   highest_target_id_ = value;
+}
+inline void TargetGlobal::set_highest_target_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
+  _internal_set_highest_target_id(value);
   // @@protoc_insertion_point(field_set:firestore.client.TargetGlobal.highest_target_id)
 }
 
@@ -736,26 +845,38 @@ inline void TargetGlobal::set_highest_target_id(::PROTOBUF_NAMESPACE_ID::int32 v
 inline void TargetGlobal::clear_highest_listen_sequence_number() {
   highest_listen_sequence_number_ = PROTOBUF_LONGLONG(0);
 }
+inline ::PROTOBUF_NAMESPACE_ID::int64 TargetGlobal::_internal_highest_listen_sequence_number() const {
+  return highest_listen_sequence_number_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int64 TargetGlobal::highest_listen_sequence_number() const {
   // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.highest_listen_sequence_number)
-  return highest_listen_sequence_number_;
+  return _internal_highest_listen_sequence_number();
 }
-inline void TargetGlobal::set_highest_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void TargetGlobal::_internal_set_highest_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value) {
   
   highest_listen_sequence_number_ = value;
+}
+inline void TargetGlobal::set_highest_listen_sequence_number(::PROTOBUF_NAMESPACE_ID::int64 value) {
+  _internal_set_highest_listen_sequence_number(value);
   // @@protoc_insertion_point(field_set:firestore.client.TargetGlobal.highest_listen_sequence_number)
 }
 
 // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
-inline bool TargetGlobal::has_last_remote_snapshot_version() const {
+inline bool TargetGlobal::_internal_has_last_remote_snapshot_version() const {
   return this != internal_default_instance() && last_remote_snapshot_version_ != nullptr;
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& TargetGlobal::last_remote_snapshot_version() const {
+inline bool TargetGlobal::has_last_remote_snapshot_version() const {
+  return _internal_has_last_remote_snapshot_version();
+}
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& TargetGlobal::_internal_last_remote_snapshot_version() const {
   const PROTOBUF_NAMESPACE_ID::Timestamp* p = last_remote_snapshot_version_;
-  // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.last_remote_snapshot_version)
   return p != nullptr ? *p : *reinterpret_cast<const PROTOBUF_NAMESPACE_ID::Timestamp*>(
       &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& TargetGlobal::last_remote_snapshot_version() const {
+  // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.last_remote_snapshot_version)
+  return _internal_last_remote_snapshot_version();
+}
 inline PROTOBUF_NAMESPACE_ID::Timestamp* TargetGlobal::release_last_remote_snapshot_version() {
   // @@protoc_insertion_point(field_release:firestore.client.TargetGlobal.last_remote_snapshot_version)
   
@@ -763,15 +884,18 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* TargetGlobal::release_last_remote_snaps
   last_remote_snapshot_version_ = nullptr;
   return temp;
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* TargetGlobal::mutable_last_remote_snapshot_version() {
+inline PROTOBUF_NAMESPACE_ID::Timestamp* TargetGlobal::_internal_mutable_last_remote_snapshot_version() {
   
   if (last_remote_snapshot_version_ == nullptr) {
     auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaNoVirtual());
     last_remote_snapshot_version_ = p;
   }
-  // @@protoc_insertion_point(field_mutable:firestore.client.TargetGlobal.last_remote_snapshot_version)
   return last_remote_snapshot_version_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* TargetGlobal::mutable_last_remote_snapshot_version() {
+  // @@protoc_insertion_point(field_mutable:firestore.client.TargetGlobal.last_remote_snapshot_version)
+  return _internal_mutable_last_remote_snapshot_version();
+}
 inline void TargetGlobal::set_allocated_last_remote_snapshot_version(PROTOBUF_NAMESPACE_ID::Timestamp* last_remote_snapshot_version) {
   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
   if (message_arena == nullptr) {
@@ -796,13 +920,19 @@ inline void TargetGlobal::set_allocated_last_remote_snapshot_version(PROTOBUF_NA
 inline void TargetGlobal::clear_target_count() {
   target_count_ = 0;
 }
+inline ::PROTOBUF_NAMESPACE_ID::int32 TargetGlobal::_internal_target_count() const {
+  return target_count_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int32 TargetGlobal::target_count() const {
   // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.target_count)
-  return target_count_;
+  return _internal_target_count();
 }
-inline void TargetGlobal::set_target_count(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void TargetGlobal::_internal_set_target_count(::PROTOBUF_NAMESPACE_ID::int32 value) {
   
   target_count_ = value;
+}
+inline void TargetGlobal::set_target_count(::PROTOBUF_NAMESPACE_ID::int32 value) {
+  _internal_set_target_count(value);
   // @@protoc_insertion_point(field_set:firestore.client.TargetGlobal.target_count)
 }
 

+ 0 - 1
Firestore/Protos/cpp/google/api/annotations.pb.cc

@@ -21,7 +21,6 @@
 
 #include <algorithm>
 
-#include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/extension_set.h>
 #include <google/protobuf/wire_format_lite.h>

+ 2 - 2
Firestore/Protos/cpp/google/api/annotations.pb.h

@@ -24,12 +24,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3009000
+#if PROTOBUF_VERSION < 3011000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.

Файловите разлики са ограничени, защото са твърде много
+ 133 - 566
Firestore/Protos/cpp/google/api/http.pb.cc


Файловите разлики са ограничени, защото са твърде много
+ 255 - 128
Firestore/Protos/cpp/google/api/http.pb.h


+ 104 - 458
Firestore/Protos/cpp/google/firestore/v1/common.pb.cc

@@ -21,7 +21,6 @@
 
 #include <algorithm>
 
-#include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/extension_set.h>
 #include <google/protobuf/wire_format_lite.h>
@@ -77,7 +76,7 @@ static void InitDefaultsscc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto}, {}};
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto}, {}};
 
 static void InitDefaultsscc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
@@ -91,7 +90,7 @@ static void InitDefaultsscc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto}, {
       &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
 
 static void InitDefaultsscc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto() {
@@ -106,7 +105,7 @@ static void InitDefaultsscc_info_TransactionOptions_google_2ffirestore_2fv1_2fco
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto}, {
       &scc_info_TransactionOptions_ReadOnly_google_2ffirestore_2fv1_2fcommon_2eproto.base,
       &scc_info_TransactionOptions_ReadWrite_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};
 
@@ -122,7 +121,7 @@ static void InitDefaultsscc_info_TransactionOptions_ReadOnly_google_2ffirestore_
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TransactionOptions_ReadOnly_google_2ffirestore_2fv1_2fcommon_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TransactionOptions_ReadOnly_google_2ffirestore_2fv1_2fcommon_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_TransactionOptions_ReadOnly_google_2ffirestore_2fv1_2fcommon_2eproto}, {
       &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
 
 static void InitDefaultsscc_info_TransactionOptions_ReadWrite_google_2ffirestore_2fv1_2fcommon_2eproto() {
@@ -137,7 +136,7 @@ static void InitDefaultsscc_info_TransactionOptions_ReadWrite_google_2ffirestore
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TransactionOptions_ReadWrite_google_2ffirestore_2fv1_2fcommon_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_TransactionOptions_ReadWrite_google_2ffirestore_2fv1_2fcommon_2eproto}, {}};
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_TransactionOptions_ReadWrite_google_2ffirestore_2fv1_2fcommon_2eproto}, {}};
 
 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto[5];
 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2ffirestore_2fv1_2fcommon_2eproto = nullptr;
@@ -295,7 +294,6 @@ void DocumentMask::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* DocumentMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -309,10 +307,12 @@ const char* DocumentMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
           ptr -= 1;
           do {
             ptr += 1;
-            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_field_paths(), ptr, ctx, "google.firestore.v1.DocumentMask.field_paths");
+            auto str = _internal_add_field_paths();
+            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+            CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.DocumentMask.field_paths"));
             CHK_(ptr);
             if (!ctx->DataAvailable(ptr)) break;
-          } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
+          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
         } else goto handle_unusual;
         continue;
       default: {
@@ -334,96 +334,26 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool DocumentMask::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentMask)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // repeated string field_paths = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
-                input, this->add_field_paths()));
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-            this->field_paths(this->field_paths_size() - 1).data(),
-            static_cast<int>(this->field_paths(this->field_paths_size() - 1).length()),
-            ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
-            "google.firestore.v1.DocumentMask.field_paths"));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentMask)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentMask)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void DocumentMask::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentMask)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // repeated string field_paths = 1;
-  for (int i = 0, n = this->field_paths_size(); i < n; i++) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->field_paths(i).data(), static_cast<int>(this->field_paths(i).length()),
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
-      "google.firestore.v1.DocumentMask.field_paths");
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
-      1, this->field_paths(i), output);
-  }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentMask)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* DocumentMask::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* DocumentMask::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentMask)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // repeated string field_paths = 1;
-  for (int i = 0, n = this->field_paths_size(); i < n; i++) {
+  for (int i = 0, n = this->_internal_field_paths_size(); i < n; i++) {
+    const auto& s = this->_internal_field_paths(i);
     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->field_paths(i).data(), static_cast<int>(this->field_paths(i).length()),
+      s.data(), static_cast<int>(s.length()),
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
       "google.firestore.v1.DocumentMask.field_paths");
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      WriteStringToArray(1, this->field_paths(i), target);
+    target = stream->WriteString(1, s, target);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentMask)
   return target;
@@ -433,23 +363,22 @@ size_t DocumentMask::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentMask)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
 
   // repeated string field_paths = 1;
   total_size += 1 *
-      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->field_paths_size());
-  for (int i = 0, n = this->field_paths_size(); i < n; i++) {
+      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(field_paths_.size());
+  for (int i = 0, n = field_paths_.size(); i < n; i++) {
     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
-      this->field_paths(i));
+      field_paths_.Get(i));
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -501,7 +430,7 @@ bool DocumentMask::IsInitialized() const {
 void DocumentMask::InternalSwap(DocumentMask* other) {
   using std::swap;
   _internal_metadata_.Swap(&other->_internal_metadata_);
-  field_paths_.InternalSwap(CastToBase(&other->field_paths_));
+  field_paths_.InternalSwap(&other->field_paths_);
 }
 
 ::PROTOBUF_NAMESPACE_ID::Metadata DocumentMask::GetMetadata() const {
@@ -541,7 +470,7 @@ void Precondition::set_allocated_update_time(PROTOBUF_NAMESPACE_ID::Timestamp* u
   // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Precondition.update_time)
 }
 void Precondition::clear_update_time() {
-  if (has_update_time()) {
+  if (_internal_has_update_time()) {
     delete condition_type_.update_time_;
     clear_has_condition_type();
   }
@@ -558,11 +487,11 @@ Precondition::Precondition(const Precondition& from)
   clear_has_condition_type();
   switch (from.condition_type_case()) {
     case kExists: {
-      set_exists(from.exists());
+      _internal_set_exists(from._internal_exists());
       break;
     }
     case kUpdateTime: {
-      mutable_update_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.update_time());
+      _internal_mutable_update_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_update_time());
       break;
     }
     case CONDITION_TYPE_NOT_SET: {
@@ -626,7 +555,6 @@ void Precondition::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* Precondition::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -637,14 +565,14 @@ const char* Precondition::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
       // bool exists = 1;
       case 1:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
-          set_exists(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
+          _internal_set_exists(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .google.protobuf.Timestamp update_time = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ctx->ParseMessage(mutable_update_time(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_update_time(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -667,108 +595,30 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool Precondition::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:google.firestore.v1.Precondition)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // bool exists = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
-          clear_condition_type();
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
-                 input, &condition_type_.exists_)));
-          set_has_exists();
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
 
-      // .google.protobuf.Timestamp update_time = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_update_time()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:google.firestore.v1.Precondition)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:google.firestore.v1.Precondition)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void Precondition::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:google.firestore.v1.Precondition)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // bool exists = 1;
-  if (has_exists()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->exists(), output);
-  }
-
-  // .google.protobuf.Timestamp update_time = 2;
-  if (has_update_time()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, _Internal::update_time(this), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:google.firestore.v1.Precondition)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* Precondition::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* Precondition::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Precondition)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // bool exists = 1;
-  if (has_exists()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->exists(), target);
+  if (_internal_has_exists()) {
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_exists(), target);
   }
 
   // .google.protobuf.Timestamp update_time = 2;
-  if (has_update_time()) {
+  if (_internal_has_update_time()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, _Internal::update_time(this), target);
+      InternalWriteMessage(
+        2, _Internal::update_time(this), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Precondition)
   return target;
@@ -778,11 +628,6 @@ size_t Precondition::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Precondition)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -804,6 +649,10 @@ size_t Precondition::ByteSizeLong() const {
       break;
     }
   }
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -833,11 +682,11 @@ void Precondition::MergeFrom(const Precondition& from) {
 
   switch (from.condition_type_case()) {
     case kExists: {
-      set_exists(from.exists());
+      _internal_set_exists(from._internal_exists());
       break;
     }
     case kUpdateTime: {
-      mutable_update_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.update_time());
+      _internal_mutable_update_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_update_time());
       break;
     }
     case CONDITION_TYPE_NOT_SET: {
@@ -894,7 +743,7 @@ TransactionOptions_ReadWrite::TransactionOptions_ReadWrite(const TransactionOpti
       _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   retry_transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
-  if (!from.retry_transaction().empty()) {
+  if (!from._internal_retry_transaction().empty()) {
     retry_transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.retry_transaction_);
   }
   // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions.ReadWrite)
@@ -933,7 +782,6 @@ void TransactionOptions_ReadWrite::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* TransactionOptions_ReadWrite::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -944,7 +792,8 @@ const char* TransactionOptions_ReadWrite::_InternalParse(const char* ptr, ::PROT
       // bytes retry_transaction = 1;
       case 1:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
-          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_retry_transaction(), ptr, ctx);
+          auto str = _internal_mutable_retry_transaction();
+          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -967,84 +816,22 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool TransactionOptions_ReadWrite::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions.ReadWrite)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // bytes retry_transaction = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
-                input, this->mutable_retry_transaction()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
 
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions.ReadWrite)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions.ReadWrite)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void TransactionOptions_ReadWrite::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions.ReadWrite)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // bytes retry_transaction = 1;
-  if (this->retry_transaction().size() > 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
-      1, this->retry_transaction(), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions.ReadWrite)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* TransactionOptions_ReadWrite::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* TransactionOptions_ReadWrite::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadWrite)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // bytes retry_transaction = 1;
   if (this->retry_transaction().size() > 0) {
-    target =
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
-        1, this->retry_transaction(), target);
+    target = stream->WriteBytesMaybeAliased(
+        1, this->_internal_retry_transaction(), target);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadWrite)
   return target;
@@ -1054,11 +841,6 @@ size_t TransactionOptions_ReadWrite::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadWrite)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -1067,9 +849,13 @@ size_t TransactionOptions_ReadWrite::ByteSizeLong() const {
   if (this->retry_transaction().size() > 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
-        this->retry_transaction());
+        this->_internal_retry_transaction());
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -1164,7 +950,7 @@ void TransactionOptions_ReadOnly::set_allocated_read_time(PROTOBUF_NAMESPACE_ID:
   // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
 }
 void TransactionOptions_ReadOnly::clear_read_time() {
-  if (has_read_time()) {
+  if (_internal_has_read_time()) {
     delete consistency_selector_.read_time_;
     clear_has_consistency_selector();
   }
@@ -1181,7 +967,7 @@ TransactionOptions_ReadOnly::TransactionOptions_ReadOnly(const TransactionOption
   clear_has_consistency_selector();
   switch (from.consistency_selector_case()) {
     case kReadTime: {
-      mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
+      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
       break;
     }
     case CONSISTENCY_SELECTOR_NOT_SET: {
@@ -1241,7 +1027,6 @@ void TransactionOptions_ReadOnly::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* TransactionOptions_ReadOnly::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -1252,7 +1037,7 @@ const char* TransactionOptions_ReadOnly::_InternalParse(const char* ptr, ::PROTO
       // .google.protobuf.Timestamp read_time = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ctx->ParseMessage(mutable_read_time(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -1275,84 +1060,24 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool TransactionOptions_ReadOnly::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions.ReadOnly)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // .google.protobuf.Timestamp read_time = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_read_time()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions.ReadOnly)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions.ReadOnly)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void TransactionOptions_ReadOnly::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions.ReadOnly)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // .google.protobuf.Timestamp read_time = 2;
-  if (has_read_time()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, _Internal::read_time(this), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions.ReadOnly)
-}
 
-::PROTOBUF_NAMESPACE_ID::uint8* TransactionOptions_ReadOnly::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* TransactionOptions_ReadOnly::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadOnly)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // .google.protobuf.Timestamp read_time = 2;
-  if (has_read_time()) {
+  if (_internal_has_read_time()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, _Internal::read_time(this), target);
+      InternalWriteMessage(
+        2, _Internal::read_time(this), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadOnly)
   return target;
@@ -1362,11 +1087,6 @@ size_t TransactionOptions_ReadOnly::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadOnly)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -1383,6 +1103,10 @@ size_t TransactionOptions_ReadOnly::ByteSizeLong() const {
       break;
     }
   }
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -1412,7 +1136,7 @@ void TransactionOptions_ReadOnly::MergeFrom(const TransactionOptions_ReadOnly& f
 
   switch (from.consistency_selector_case()) {
     case kReadTime: {
-      mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
+      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
       break;
     }
     case CONSISTENCY_SELECTOR_NOT_SET: {
@@ -1513,11 +1237,11 @@ TransactionOptions::TransactionOptions(const TransactionOptions& from)
   clear_has_mode();
   switch (from.mode_case()) {
     case kReadOnly: {
-      mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from.read_only());
+      _internal_mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from._internal_read_only());
       break;
     }
     case kReadWrite: {
-      mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from.read_write());
+      _internal_mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from._internal_read_write());
       break;
     }
     case MODE_NOT_SET: {
@@ -1581,7 +1305,6 @@ void TransactionOptions::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* TransactionOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -1592,14 +1315,14 @@ const char* TransactionOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMES
       // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ctx->ParseMessage(mutable_read_only(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_read_only(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
       // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
       case 3:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
-          ptr = ctx->ParseMessage(mutable_read_write(), ptr);
+          ptr = ctx->ParseMessage(_internal_mutable_read_write(), ptr);
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -1622,108 +1345,32 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool TransactionOptions::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_read_only()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
 
-      // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
-      case 3: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-               input, mutable_read_write()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void TransactionOptions::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
-  if (has_read_only()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, _Internal::read_only(this), output);
-  }
-
-  // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
-  if (has_read_write()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      3, _Internal::read_write(this), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* TransactionOptions::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* TransactionOptions::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
-  if (has_read_only()) {
+  if (_internal_has_read_only()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        2, _Internal::read_only(this), target);
+      InternalWriteMessage(
+        2, _Internal::read_only(this), target, stream);
   }
 
   // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
-  if (has_read_write()) {
+  if (_internal_has_read_write()) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        3, _Internal::read_write(this), target);
+      InternalWriteMessage(
+        3, _Internal::read_write(this), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions)
   return target;
@@ -1733,11 +1380,6 @@ size_t TransactionOptions::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -1761,6 +1403,10 @@ size_t TransactionOptions::ByteSizeLong() const {
       break;
     }
   }
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -1790,11 +1436,11 @@ void TransactionOptions::MergeFrom(const TransactionOptions& from) {
 
   switch (from.mode_case()) {
     case kReadOnly: {
-      mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from.read_only());
+      _internal_mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from._internal_read_only());
       break;
     }
     case kReadWrite: {
-      mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from.read_write());
+      _internal_mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from._internal_read_write());
       break;
     }
     case MODE_NOT_SET: {

+ 166 - 97
Firestore/Protos/cpp/google/firestore/v1/common.pb.h

@@ -24,12 +24,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3009000
+#if PROTOBUF_VERSION < 3011000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.
@@ -175,16 +175,9 @@ class DocumentMask :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -223,6 +216,9 @@ class DocumentMask :
   };
   // repeated string field_paths = 1;
   int field_paths_size() const;
+  private:
+  int _internal_field_paths_size() const;
+  public:
   void clear_field_paths();
   const std::string& field_paths(int index) const;
   std::string* mutable_field_paths(int index);
@@ -237,6 +233,10 @@ class DocumentMask :
   void add_field_paths(const char* value, size_t size);
   const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& field_paths() const;
   ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_field_paths();
+  private:
+  const std::string& _internal_field_paths(int index) const;
+  std::string* _internal_add_field_paths();
+  public:
 
   // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentMask)
  private:
@@ -324,16 +324,9 @@ class Precondition :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -373,19 +366,30 @@ class Precondition :
   };
   // bool exists = 1;
   private:
-  bool has_exists() const;
+  bool _internal_has_exists() const;
   public:
   void clear_exists();
   bool exists() const;
   void set_exists(bool value);
+  private:
+  bool _internal_exists() const;
+  void _internal_set_exists(bool value);
+  public:
 
   // .google.protobuf.Timestamp update_time = 2;
   bool has_update_time() const;
+  private:
+  bool _internal_has_update_time() const;
+  public:
   void clear_update_time();
   const PROTOBUF_NAMESPACE_ID::Timestamp& update_time() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_update_time();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_update_time();
   void set_allocated_update_time(PROTOBUF_NAMESPACE_ID::Timestamp* update_time);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_update_time() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_update_time();
+  public:
 
   void clear_condition_type();
   ConditionTypeCase condition_type_case() const;
@@ -480,16 +484,9 @@ class TransactionOptions_ReadWrite :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -536,6 +533,11 @@ class TransactionOptions_ReadWrite :
   std::string* mutable_retry_transaction();
   std::string* release_retry_transaction();
   void set_allocated_retry_transaction(std::string* retry_transaction);
+  private:
+  const std::string& _internal_retry_transaction() const;
+  void _internal_set_retry_transaction(const std::string& value);
+  std::string* _internal_mutable_retry_transaction();
+  public:
 
   // @@protoc_insertion_point(class_scope:google.firestore.v1.TransactionOptions.ReadWrite)
  private:
@@ -622,16 +624,9 @@ class TransactionOptions_ReadOnly :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -670,11 +665,18 @@ class TransactionOptions_ReadOnly :
   };
   // .google.protobuf.Timestamp read_time = 2;
   bool has_read_time() const;
+  private:
+  bool _internal_has_read_time() const;
+  public:
   void clear_read_time();
   const PROTOBUF_NAMESPACE_ID::Timestamp& read_time() const;
   PROTOBUF_NAMESPACE_ID::Timestamp* release_read_time();
   PROTOBUF_NAMESPACE_ID::Timestamp* mutable_read_time();
   void set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time);
+  private:
+  const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_read_time() const;
+  PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_read_time();
+  public:
 
   void clear_consistency_selector();
   ConsistencySelectorCase consistency_selector_case() const;
@@ -773,16 +775,9 @@ class TransactionOptions :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -825,19 +820,33 @@ class TransactionOptions :
   };
   // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
   bool has_read_only() const;
+  private:
+  bool _internal_has_read_only() const;
+  public:
   void clear_read_only();
   const ::google::firestore::v1::TransactionOptions_ReadOnly& read_only() const;
   ::google::firestore::v1::TransactionOptions_ReadOnly* release_read_only();
   ::google::firestore::v1::TransactionOptions_ReadOnly* mutable_read_only();
   void set_allocated_read_only(::google::firestore::v1::TransactionOptions_ReadOnly* read_only);
+  private:
+  const ::google::firestore::v1::TransactionOptions_ReadOnly& _internal_read_only() const;
+  ::google::firestore::v1::TransactionOptions_ReadOnly* _internal_mutable_read_only();
+  public:
 
   // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
   bool has_read_write() const;
+  private:
+  bool _internal_has_read_write() const;
+  public:
   void clear_read_write();
   const ::google::firestore::v1::TransactionOptions_ReadWrite& read_write() const;
   ::google::firestore::v1::TransactionOptions_ReadWrite* release_read_write();
   ::google::firestore::v1::TransactionOptions_ReadWrite* mutable_read_write();
   void set_allocated_read_write(::google::firestore::v1::TransactionOptions_ReadWrite* read_write);
+  private:
+  const ::google::firestore::v1::TransactionOptions_ReadWrite& _internal_read_write() const;
+  ::google::firestore::v1::TransactionOptions_ReadWrite* _internal_mutable_read_write();
+  public:
 
   void clear_mode();
   ModeCase mode_case() const;
@@ -873,15 +882,25 @@ class TransactionOptions :
 // DocumentMask
 
 // repeated string field_paths = 1;
-inline int DocumentMask::field_paths_size() const {
+inline int DocumentMask::_internal_field_paths_size() const {
   return field_paths_.size();
 }
+inline int DocumentMask::field_paths_size() const {
+  return _internal_field_paths_size();
+}
 inline void DocumentMask::clear_field_paths() {
   field_paths_.Clear();
 }
+inline std::string* DocumentMask::add_field_paths() {
+  // @@protoc_insertion_point(field_add_mutable:google.firestore.v1.DocumentMask.field_paths)
+  return _internal_add_field_paths();
+}
+inline const std::string& DocumentMask::_internal_field_paths(int index) const {
+  return field_paths_.Get(index);
+}
 inline const std::string& DocumentMask::field_paths(int index) const {
   // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentMask.field_paths)
-  return field_paths_.Get(index);
+  return _internal_field_paths(index);
 }
 inline std::string* DocumentMask::mutable_field_paths(int index) {
   // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentMask.field_paths)
@@ -905,8 +924,7 @@ inline void DocumentMask::set_field_paths(int index, const char* value, size_t s
     reinterpret_cast<const char*>(value), size);
   // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.DocumentMask.field_paths)
 }
-inline std::string* DocumentMask::add_field_paths() {
-  // @@protoc_insertion_point(field_add_mutable:google.firestore.v1.DocumentMask.field_paths)
+inline std::string* DocumentMask::_internal_add_field_paths() {
   return field_paths_.Add();
 }
 inline void DocumentMask::add_field_paths(const std::string& value) {
@@ -942,44 +960,53 @@ DocumentMask::mutable_field_paths() {
 // Precondition
 
 // bool exists = 1;
-inline bool Precondition::has_exists() const {
+inline bool Precondition::_internal_has_exists() const {
   return condition_type_case() == kExists;
 }
 inline void Precondition::set_has_exists() {
   _oneof_case_[0] = kExists;
 }
 inline void Precondition::clear_exists() {
-  if (has_exists()) {
+  if (_internal_has_exists()) {
     condition_type_.exists_ = false;
     clear_has_condition_type();
   }
 }
-inline bool Precondition::exists() const {
-  // @@protoc_insertion_point(field_get:google.firestore.v1.Precondition.exists)
-  if (has_exists()) {
+inline bool Precondition::_internal_exists() const {
+  if (_internal_has_exists()) {
     return condition_type_.exists_;
   }
   return false;
 }
-inline void Precondition::set_exists(bool value) {
-  if (!has_exists()) {
+inline void Precondition::_internal_set_exists(bool value) {
+  if (!_internal_has_exists()) {
     clear_condition_type();
     set_has_exists();
   }
   condition_type_.exists_ = value;
+}
+inline bool Precondition::exists() const {
+  // @@protoc_insertion_point(field_get:google.firestore.v1.Precondition.exists)
+  return _internal_exists();
+}
+inline void Precondition::set_exists(bool value) {
+  _internal_set_exists(value);
   // @@protoc_insertion_point(field_set:google.firestore.v1.Precondition.exists)
 }
 
 // .google.protobuf.Timestamp update_time = 2;
-inline bool Precondition::has_update_time() const {
+inline bool Precondition::_internal_has_update_time() const {
   return condition_type_case() == kUpdateTime;
 }
+inline bool Precondition::has_update_time() const {
+  return _internal_has_update_time();
+}
 inline void Precondition::set_has_update_time() {
   _oneof_case_[0] = kUpdateTime;
 }
 inline PROTOBUF_NAMESPACE_ID::Timestamp* Precondition::release_update_time() {
   // @@protoc_insertion_point(field_release:google.firestore.v1.Precondition.update_time)
-  if (has_update_time()) {
+  if (_internal_has_update_time()) {
     clear_has_condition_type();
       PROTOBUF_NAMESPACE_ID::Timestamp* temp = condition_type_.update_time_;
     condition_type_.update_time_ = nullptr;
@@ -988,22 +1015,28 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* Precondition::release_update_time() {
     return nullptr;
   }
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& Precondition::update_time() const {
-  // @@protoc_insertion_point(field_get:google.firestore.v1.Precondition.update_time)
-  return has_update_time()
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& Precondition::_internal_update_time() const {
+  return _internal_has_update_time()
       ? *condition_type_.update_time_
       : *reinterpret_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(&PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* Precondition::mutable_update_time() {
-  if (!has_update_time()) {
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& Precondition::update_time() const {
+  // @@protoc_insertion_point(field_get:google.firestore.v1.Precondition.update_time)
+  return _internal_update_time();
+}
+inline PROTOBUF_NAMESPACE_ID::Timestamp* Precondition::_internal_mutable_update_time() {
+  if (!_internal_has_update_time()) {
     clear_condition_type();
     set_has_update_time();
     condition_type_.update_time_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Timestamp >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Precondition.update_time)
   return condition_type_.update_time_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* Precondition::mutable_update_time() {
+  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Precondition.update_time)
+  return _internal_mutable_update_time();
+}
 
 inline bool Precondition::has_condition_type() const {
   return condition_type_case() != CONDITION_TYPE_NOT_SET;
@@ -1024,12 +1057,22 @@ inline void TransactionOptions_ReadWrite::clear_retry_transaction() {
 }
 inline const std::string& TransactionOptions_ReadWrite::retry_transaction() const {
   // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction)
-  return retry_transaction_.GetNoArena();
+  return _internal_retry_transaction();
 }
 inline void TransactionOptions_ReadWrite::set_retry_transaction(const std::string& value) {
+  _internal_set_retry_transaction(value);
+  // @@protoc_insertion_point(field_set:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction)
+}
+inline std::string* TransactionOptions_ReadWrite::mutable_retry_transaction() {
+  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction)
+  return _internal_mutable_retry_transaction();
+}
+inline const std::string& TransactionOptions_ReadWrite::_internal_retry_transaction() const {
+  return retry_transaction_.GetNoArena();
+}
+inline void TransactionOptions_ReadWrite::_internal_set_retry_transaction(const std::string& value) {
   
   retry_transaction_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction)
 }
 inline void TransactionOptions_ReadWrite::set_retry_transaction(std::string&& value) {
   
@@ -1049,9 +1092,8 @@ inline void TransactionOptions_ReadWrite::set_retry_transaction(const void* valu
       ::std::string(reinterpret_cast<const char*>(value), size));
   // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction)
 }
-inline std::string* TransactionOptions_ReadWrite::mutable_retry_transaction() {
+inline std::string* TransactionOptions_ReadWrite::_internal_mutable_retry_transaction() {
   
-  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction)
   return retry_transaction_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
 }
 inline std::string* TransactionOptions_ReadWrite::release_retry_transaction() {
@@ -1074,15 +1116,18 @@ inline void TransactionOptions_ReadWrite::set_allocated_retry_transaction(std::s
 // TransactionOptions_ReadOnly
 
 // .google.protobuf.Timestamp read_time = 2;
-inline bool TransactionOptions_ReadOnly::has_read_time() const {
+inline bool TransactionOptions_ReadOnly::_internal_has_read_time() const {
   return consistency_selector_case() == kReadTime;
 }
+inline bool TransactionOptions_ReadOnly::has_read_time() const {
+  return _internal_has_read_time();
+}
 inline void TransactionOptions_ReadOnly::set_has_read_time() {
   _oneof_case_[0] = kReadTime;
 }
 inline PROTOBUF_NAMESPACE_ID::Timestamp* TransactionOptions_ReadOnly::release_read_time() {
   // @@protoc_insertion_point(field_release:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
-  if (has_read_time()) {
+  if (_internal_has_read_time()) {
     clear_has_consistency_selector();
       PROTOBUF_NAMESPACE_ID::Timestamp* temp = consistency_selector_.read_time_;
     consistency_selector_.read_time_ = nullptr;
@@ -1091,22 +1136,28 @@ inline PROTOBUF_NAMESPACE_ID::Timestamp* TransactionOptions_ReadOnly::release_re
     return nullptr;
   }
 }
-inline const PROTOBUF_NAMESPACE_ID::Timestamp& TransactionOptions_ReadOnly::read_time() const {
-  // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
-  return has_read_time()
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& TransactionOptions_ReadOnly::_internal_read_time() const {
+  return _internal_has_read_time()
       ? *consistency_selector_.read_time_
       : *reinterpret_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(&PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_);
 }
-inline PROTOBUF_NAMESPACE_ID::Timestamp* TransactionOptions_ReadOnly::mutable_read_time() {
-  if (!has_read_time()) {
+inline const PROTOBUF_NAMESPACE_ID::Timestamp& TransactionOptions_ReadOnly::read_time() const {
+  // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
+  return _internal_read_time();
+}
+inline PROTOBUF_NAMESPACE_ID::Timestamp* TransactionOptions_ReadOnly::_internal_mutable_read_time() {
+  if (!_internal_has_read_time()) {
     clear_consistency_selector();
     set_has_read_time();
     consistency_selector_.read_time_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Timestamp >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
   return consistency_selector_.read_time_;
 }
+inline PROTOBUF_NAMESPACE_ID::Timestamp* TransactionOptions_ReadOnly::mutable_read_time() {
+  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
+  return _internal_mutable_read_time();
+}
 
 inline bool TransactionOptions_ReadOnly::has_consistency_selector() const {
   return consistency_selector_case() != CONSISTENCY_SELECTOR_NOT_SET;
@@ -1122,21 +1173,24 @@ inline TransactionOptions_ReadOnly::ConsistencySelectorCase TransactionOptions_R
 // TransactionOptions
 
 // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
-inline bool TransactionOptions::has_read_only() const {
+inline bool TransactionOptions::_internal_has_read_only() const {
   return mode_case() == kReadOnly;
 }
+inline bool TransactionOptions::has_read_only() const {
+  return _internal_has_read_only();
+}
 inline void TransactionOptions::set_has_read_only() {
   _oneof_case_[0] = kReadOnly;
 }
 inline void TransactionOptions::clear_read_only() {
-  if (has_read_only()) {
+  if (_internal_has_read_only()) {
     delete mode_.read_only_;
     clear_has_mode();
   }
 }
 inline ::google::firestore::v1::TransactionOptions_ReadOnly* TransactionOptions::release_read_only() {
   // @@protoc_insertion_point(field_release:google.firestore.v1.TransactionOptions.read_only)
-  if (has_read_only()) {
+  if (_internal_has_read_only()) {
     clear_has_mode();
       ::google::firestore::v1::TransactionOptions_ReadOnly* temp = mode_.read_only_;
     mode_.read_only_ = nullptr;
@@ -1145,39 +1199,48 @@ inline ::google::firestore::v1::TransactionOptions_ReadOnly* TransactionOptions:
     return nullptr;
   }
 }
-inline const ::google::firestore::v1::TransactionOptions_ReadOnly& TransactionOptions::read_only() const {
-  // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.read_only)
-  return has_read_only()
+inline const ::google::firestore::v1::TransactionOptions_ReadOnly& TransactionOptions::_internal_read_only() const {
+  return _internal_has_read_only()
       ? *mode_.read_only_
       : *reinterpret_cast< ::google::firestore::v1::TransactionOptions_ReadOnly*>(&::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_);
 }
-inline ::google::firestore::v1::TransactionOptions_ReadOnly* TransactionOptions::mutable_read_only() {
-  if (!has_read_only()) {
+inline const ::google::firestore::v1::TransactionOptions_ReadOnly& TransactionOptions::read_only() const {
+  // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.read_only)
+  return _internal_read_only();
+}
+inline ::google::firestore::v1::TransactionOptions_ReadOnly* TransactionOptions::_internal_mutable_read_only() {
+  if (!_internal_has_read_only()) {
     clear_mode();
     set_has_read_only();
     mode_.read_only_ = CreateMaybeMessage< ::google::firestore::v1::TransactionOptions_ReadOnly >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.read_only)
   return mode_.read_only_;
 }
+inline ::google::firestore::v1::TransactionOptions_ReadOnly* TransactionOptions::mutable_read_only() {
+  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.read_only)
+  return _internal_mutable_read_only();
+}
 
 // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
-inline bool TransactionOptions::has_read_write() const {
+inline bool TransactionOptions::_internal_has_read_write() const {
   return mode_case() == kReadWrite;
 }
+inline bool TransactionOptions::has_read_write() const {
+  return _internal_has_read_write();
+}
 inline void TransactionOptions::set_has_read_write() {
   _oneof_case_[0] = kReadWrite;
 }
 inline void TransactionOptions::clear_read_write() {
-  if (has_read_write()) {
+  if (_internal_has_read_write()) {
     delete mode_.read_write_;
     clear_has_mode();
   }
 }
 inline ::google::firestore::v1::TransactionOptions_ReadWrite* TransactionOptions::release_read_write() {
   // @@protoc_insertion_point(field_release:google.firestore.v1.TransactionOptions.read_write)
-  if (has_read_write()) {
+  if (_internal_has_read_write()) {
     clear_has_mode();
       ::google::firestore::v1::TransactionOptions_ReadWrite* temp = mode_.read_write_;
     mode_.read_write_ = nullptr;
@@ -1186,22 +1249,28 @@ inline ::google::firestore::v1::TransactionOptions_ReadWrite* TransactionOptions
     return nullptr;
   }
 }
-inline const ::google::firestore::v1::TransactionOptions_ReadWrite& TransactionOptions::read_write() const {
-  // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.read_write)
-  return has_read_write()
+inline const ::google::firestore::v1::TransactionOptions_ReadWrite& TransactionOptions::_internal_read_write() const {
+  return _internal_has_read_write()
       ? *mode_.read_write_
       : *reinterpret_cast< ::google::firestore::v1::TransactionOptions_ReadWrite*>(&::google::firestore::v1::_TransactionOptions_ReadWrite_default_instance_);
 }
-inline ::google::firestore::v1::TransactionOptions_ReadWrite* TransactionOptions::mutable_read_write() {
-  if (!has_read_write()) {
+inline const ::google::firestore::v1::TransactionOptions_ReadWrite& TransactionOptions::read_write() const {
+  // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.read_write)
+  return _internal_read_write();
+}
+inline ::google::firestore::v1::TransactionOptions_ReadWrite* TransactionOptions::_internal_mutable_read_write() {
+  if (!_internal_has_read_write()) {
     clear_mode();
     set_has_read_write();
     mode_.read_write_ = CreateMaybeMessage< ::google::firestore::v1::TransactionOptions_ReadWrite >(
         GetArenaNoVirtual());
   }
-  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.read_write)
   return mode_.read_write_;
 }
+inline ::google::firestore::v1::TransactionOptions_ReadWrite* TransactionOptions::mutable_read_write() {
+  // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.read_write)
+  return _internal_mutable_read_write();
+}
 
 inline bool TransactionOptions::has_mode() const {
   return mode_case() != MODE_NOT_SET;

Файловите разлики са ограничени, защото са твърде много
+ 119 - 537
Firestore/Protos/cpp/google/firestore/v1/document.pb.cc


Файловите разлики са ограничени, защото са твърде много
+ 308 - 137
Firestore/Protos/cpp/google/firestore/v1/document.pb.h


Файловите разлики са ограничени, защото са твърде много
+ 121 - 465
Firestore/Protos/cpp/google/firestore/v1/firestore.pb.cc


Файловите разлики са ограничени, защото са твърде много
+ 338 - 133
Firestore/Protos/cpp/google/firestore/v1/firestore.pb.h


Файловите разлики са ограничени, защото са твърде много
+ 110 - 479
Firestore/Protos/cpp/google/firestore/v1/query.pb.cc


Файловите разлики са ограничени, защото са твърде много
+ 324 - 147
Firestore/Protos/cpp/google/firestore/v1/query.pb.h


Файловите разлики са ограничени, защото са твърде много
+ 128 - 456
Firestore/Protos/cpp/google/firestore/v1/write.pb.cc


Файловите разлики са ограничени, защото са твърде много
+ 331 - 134
Firestore/Protos/cpp/google/firestore/v1/write.pb.h


+ 32 - 144
Firestore/Protos/cpp/google/rpc/status.pb.cc

@@ -21,7 +21,6 @@
 
 #include <algorithm>
 
-#include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/extension_set.h>
 #include <google/protobuf/wire_format_lite.h>
@@ -52,7 +51,7 @@ static void InitDefaultsscc_info_Status_google_2frpc_2fstatus_2eproto() {
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Status_google_2frpc_2fstatus_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Status_google_2frpc_2fstatus_2eproto}, {
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Status_google_2frpc_2fstatus_2eproto}, {
       &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}};
 
 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2frpc_2fstatus_2eproto[1];
@@ -128,7 +127,7 @@ Status::Status(const Status& from)
       details_(from.details_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
-  if (!from.message().empty()) {
+  if (!from._internal_message().empty()) {
     message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.message_);
   }
   code_ = from.code_;
@@ -171,7 +170,6 @@ void Status::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* Status::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -189,7 +187,9 @@ const char* Status::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
       // string message = 2;
       case 2:
         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
-          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_message(), ptr, ctx, "google.rpc.Status.message");
+          auto str = _internal_mutable_message();
+          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.rpc.Status.message"));
           CHK_(ptr);
         } else goto handle_unusual;
         continue;
@@ -199,10 +199,10 @@ const char* Status::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
           ptr -= 1;
           do {
             ptr += 1;
-            ptr = ctx->ParseMessage(add_details(), ptr);
+            ptr = ctx->ParseMessage(_internal_add_details(), ptr);
             CHK_(ptr);
             if (!ctx->DataAvailable(ptr)) break;
-          } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
+          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
         } else goto handle_unusual;
         continue;
       default: {
@@ -224,147 +224,40 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool Status::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:google.rpc.Status)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // int32 code = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
-                 input, &code_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // string message = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
-                input, this->mutable_message()));
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-            this->message().data(), static_cast<int>(this->message().length()),
-            ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
-            "google.rpc.Status.message"));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // repeated .google.protobuf.Any details = 3;
-      case 3: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
-          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
-                input, add_details()));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:google.rpc.Status)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:google.rpc.Status)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void Status::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:google.rpc.Status)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // int32 code = 1;
-  if (this->code() != 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->code(), output);
-  }
-
-  // string message = 2;
-  if (this->message().size() > 0) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->message().data(), static_cast<int>(this->message().length()),
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
-      "google.rpc.Status.message");
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
-      2, this->message(), output);
-  }
 
-  // repeated .google.protobuf.Any details = 3;
-  for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->details_size()); i < n; i++) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
-      3,
-      this->details(static_cast<int>(i)),
-      output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:google.rpc.Status)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* Status::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* Status::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:google.rpc.Status)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // int32 code = 1;
   if (this->code() != 0) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->code(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_code(), target);
   }
 
   // string message = 2;
   if (this->message().size() > 0) {
     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
-      this->message().data(), static_cast<int>(this->message().length()),
+      this->_internal_message().data(), static_cast<int>(this->_internal_message().length()),
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
       "google.rpc.Status.message");
-    target =
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
-        2, this->message(), target);
+    target = stream->WriteStringMaybeAliased(
+        2, this->_internal_message(), target);
   }
 
   // repeated .google.protobuf.Any details = 3;
   for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->details_size()); i < n; i++) {
+      n = static_cast<unsigned int>(this->_internal_details_size()); i < n; i++) {
+    target = stream->EnsureSpace(target);
     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        3, this->details(static_cast<int>(i)), target);
+      InternalWriteMessage(3, this->_internal_details(i), target, stream);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:google.rpc.Status)
   return target;
@@ -374,40 +267,35 @@ size_t Status::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:google.rpc.Status)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
 
   // repeated .google.protobuf.Any details = 3;
-  {
-    unsigned int count = static_cast<unsigned int>(this->details_size());
-    total_size += 1UL * count;
-    for (unsigned int i = 0; i < count; i++) {
-      total_size +=
-        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
-          this->details(static_cast<int>(i)));
-    }
+  total_size += 1UL * this->_internal_details_size();
+  for (const auto& msg : this->details_) {
+    total_size +=
+      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
   }
 
   // string message = 2;
   if (this->message().size() > 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
-        this->message());
+        this->_internal_message());
   }
 
   // int32 code = 1;
   if (this->code() != 0) {
     total_size += 1 +
       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
-        this->code());
+        this->_internal_code());
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -441,7 +329,7 @@ void Status::MergeFrom(const Status& from) {
     message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.message_);
   }
   if (from.code() != 0) {
-    set_code(from.code());
+    _internal_set_code(from._internal_code());
   }
 }
 
@@ -466,7 +354,7 @@ bool Status::IsInitialized() const {
 void Status::InternalSwap(Status* other) {
   using std::swap;
   _internal_metadata_.Swap(&other->_internal_metadata_);
-  CastToBase(&details_)->InternalSwap(CastToBase(&other->details_));
+  details_.InternalSwap(&other->details_);
   message_.Swap(&other->message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
     GetArenaNoVirtual());
   swap(code_, other->code_);

+ 53 - 20
Firestore/Protos/cpp/google/rpc/status.pb.h

@@ -24,12 +24,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3009000
+#if PROTOBUF_VERSION < 3011000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.
@@ -155,16 +155,9 @@ class Status :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -205,10 +198,17 @@ class Status :
   };
   // repeated .google.protobuf.Any details = 3;
   int details_size() const;
+  private:
+  int _internal_details_size() const;
+  public:
   void clear_details();
   PROTOBUF_NAMESPACE_ID::Any* mutable_details(int index);
   ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any >*
       mutable_details();
+  private:
+  const PROTOBUF_NAMESPACE_ID::Any& _internal_details(int index) const;
+  PROTOBUF_NAMESPACE_ID::Any* _internal_add_details();
+  public:
   const PROTOBUF_NAMESPACE_ID::Any& details(int index) const;
   PROTOBUF_NAMESPACE_ID::Any* add_details();
   const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any >&
@@ -224,11 +224,20 @@ class Status :
   std::string* mutable_message();
   std::string* release_message();
   void set_allocated_message(std::string* message);
+  private:
+  const std::string& _internal_message() const;
+  void _internal_set_message(const std::string& value);
+  std::string* _internal_mutable_message();
+  public:
 
   // int32 code = 1;
   void clear_code();
   ::PROTOBUF_NAMESPACE_ID::int32 code() const;
   void set_code(::PROTOBUF_NAMESPACE_ID::int32 value);
+  private:
+  ::PROTOBUF_NAMESPACE_ID::int32 _internal_code() const;
+  void _internal_set_code(::PROTOBUF_NAMESPACE_ID::int32 value);
+  public:
 
   // @@protoc_insertion_point(class_scope:google.rpc.Status)
  private:
@@ -256,13 +265,19 @@ class Status :
 inline void Status::clear_code() {
   code_ = 0;
 }
+inline ::PROTOBUF_NAMESPACE_ID::int32 Status::_internal_code() const {
+  return code_;
+}
 inline ::PROTOBUF_NAMESPACE_ID::int32 Status::code() const {
   // @@protoc_insertion_point(field_get:google.rpc.Status.code)
-  return code_;
+  return _internal_code();
 }
-inline void Status::set_code(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Status::_internal_set_code(::PROTOBUF_NAMESPACE_ID::int32 value) {
   
   code_ = value;
+}
+inline void Status::set_code(::PROTOBUF_NAMESPACE_ID::int32 value) {
+  _internal_set_code(value);
   // @@protoc_insertion_point(field_set:google.rpc.Status.code)
 }
 
@@ -272,12 +287,22 @@ inline void Status::clear_message() {
 }
 inline const std::string& Status::message() const {
   // @@protoc_insertion_point(field_get:google.rpc.Status.message)
-  return message_.GetNoArena();
+  return _internal_message();
 }
 inline void Status::set_message(const std::string& value) {
+  _internal_set_message(value);
+  // @@protoc_insertion_point(field_set:google.rpc.Status.message)
+}
+inline std::string* Status::mutable_message() {
+  // @@protoc_insertion_point(field_mutable:google.rpc.Status.message)
+  return _internal_mutable_message();
+}
+inline const std::string& Status::_internal_message() const {
+  return message_.GetNoArena();
+}
+inline void Status::_internal_set_message(const std::string& value) {
   
   message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:google.rpc.Status.message)
 }
 inline void Status::set_message(std::string&& value) {
   
@@ -297,9 +322,8 @@ inline void Status::set_message(const char* value, size_t size) {
       ::std::string(reinterpret_cast<const char*>(value), size));
   // @@protoc_insertion_point(field_set_pointer:google.rpc.Status.message)
 }
-inline std::string* Status::mutable_message() {
+inline std::string* Status::_internal_mutable_message() {
   
-  // @@protoc_insertion_point(field_mutable:google.rpc.Status.message)
   return message_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
 }
 inline std::string* Status::release_message() {
@@ -318,9 +342,12 @@ inline void Status::set_allocated_message(std::string* message) {
 }
 
 // repeated .google.protobuf.Any details = 3;
-inline int Status::details_size() const {
+inline int Status::_internal_details_size() const {
   return details_.size();
 }
+inline int Status::details_size() const {
+  return _internal_details_size();
+}
 inline PROTOBUF_NAMESPACE_ID::Any* Status::mutable_details(int index) {
   // @@protoc_insertion_point(field_mutable:google.rpc.Status.details)
   return details_.Mutable(index);
@@ -330,13 +357,19 @@ Status::mutable_details() {
   // @@protoc_insertion_point(field_mutable_list:google.rpc.Status.details)
   return &details_;
 }
+inline const PROTOBUF_NAMESPACE_ID::Any& Status::_internal_details(int index) const {
+  return details_.Get(index);
+}
 inline const PROTOBUF_NAMESPACE_ID::Any& Status::details(int index) const {
   // @@protoc_insertion_point(field_get:google.rpc.Status.details)
-  return details_.Get(index);
+  return _internal_details(index);
+}
+inline PROTOBUF_NAMESPACE_ID::Any* Status::_internal_add_details() {
+  return details_.Add();
 }
 inline PROTOBUF_NAMESPACE_ID::Any* Status::add_details() {
   // @@protoc_insertion_point(field_add:google.rpc.Status.details)
-  return details_.Add();
+  return _internal_add_details();
 }
 inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any >&
 Status::details() const {

+ 16 - 97
Firestore/Protos/cpp/google/type/latlng.pb.cc

@@ -21,7 +21,6 @@
 
 #include <algorithm>
 
-#include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/extension_set.h>
 #include <google/protobuf/wire_format_lite.h>
@@ -51,7 +50,7 @@ static void InitDefaultsscc_info_LatLng_google_2ftype_2flatlng_2eproto() {
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_LatLng_google_2ftype_2flatlng_2eproto =
-    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_LatLng_google_2ftype_2flatlng_2eproto}, {}};
+    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_LatLng_google_2ftype_2flatlng_2eproto}, {}};
 
 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ftype_2flatlng_2eproto[1];
 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2ftype_2flatlng_2eproto = nullptr;
@@ -158,7 +157,6 @@ void LatLng::Clear() {
   _internal_metadata_.Clear();
 }
 
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 const char* LatLng::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   while (!ctx->Done(&ptr)) {
@@ -199,106 +197,28 @@ failure:
   goto success;
 #undef CHK_
 }
-#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool LatLng::MergePartialFromCodedStream(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
-  // @@protoc_insertion_point(parse_start:google.type.LatLng)
-  for (;;) {
-    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // double latitude = 1;
-      case 1: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (9 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
-                 input, &latitude_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // double longitude = 2;
-      case 2: {
-        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) {
-
-          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
-                   double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
-                 input, &longitude_)));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:google.type.LatLng)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:google.type.LatLng)
-  return false;
-#undef DO_
-}
-#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
 
-void LatLng::SerializeWithCachedSizes(
-    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:google.type.LatLng)
-  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  // double latitude = 1;
-  if (!(this->latitude() <= 0 && this->latitude() >= 0)) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(1, this->latitude(), output);
-  }
-
-  // double longitude = 2;
-  if (!(this->longitude() <= 0 && this->longitude() >= 0)) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->longitude(), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:google.type.LatLng)
-}
-
-::PROTOBUF_NAMESPACE_ID::uint8* LatLng::InternalSerializeWithCachedSizesToArray(
-    ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
+::PROTOBUF_NAMESPACE_ID::uint8* LatLng::_InternalSerialize(
+    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
   // @@protoc_insertion_point(serialize_to_array_start:google.type.LatLng)
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
   // double latitude = 1;
   if (!(this->latitude() <= 0 && this->latitude() >= 0)) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->latitude(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->_internal_latitude(), target);
   }
 
   // double longitude = 2;
   if (!(this->longitude() <= 0 && this->longitude() >= 0)) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->longitude(), target);
+    target = stream->EnsureSpace(target);
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->_internal_longitude(), target);
   }
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target, stream);
   }
   // @@protoc_insertion_point(serialize_to_array_end:google.type.LatLng)
   return target;
@@ -308,11 +228,6 @@ size_t LatLng::ByteSizeLong() const {
 // @@protoc_insertion_point(message_byte_size_start:google.type.LatLng)
   size_t total_size = 0;
 
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
@@ -327,6 +242,10 @@ size_t LatLng::ByteSizeLong() const {
     total_size += 1 + 8;
   }
 
+  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
+    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
+        _internal_metadata_, total_size, &_cached_size_);
+  }
   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -355,10 +274,10 @@ void LatLng::MergeFrom(const LatLng& from) {
   (void) cached_has_bits;
 
   if (!(from.latitude() <= 0 && from.latitude() >= 0)) {
-    set_latitude(from.latitude());
+    _internal_set_latitude(from._internal_latitude());
   }
   if (!(from.longitude() <= 0 && from.longitude() >= 0)) {
-    set_longitude(from.longitude());
+    _internal_set_longitude(from._internal_longitude());
   }
 }
 

+ 28 - 15
Firestore/Protos/cpp/google/type/latlng.pb.h

@@ -24,12 +24,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3009000
+#if PROTOBUF_VERSION < 3011000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.
@@ -154,16 +154,9 @@ class LatLng :
   bool IsInitialized() const final;
 
   size_t ByteSizeLong() const final;
-  #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
-  #else
-  bool MergePartialFromCodedStream(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
-  #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-  void SerializeWithCachedSizes(
-      ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
-  ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
-      ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
+  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
+      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
   int GetCachedSize() const final { return _cached_size_.Get(); }
 
   private:
@@ -205,11 +198,19 @@ class LatLng :
   void clear_latitude();
   double latitude() const;
   void set_latitude(double value);
+  private:
+  double _internal_latitude() const;
+  void _internal_set_latitude(double value);
+  public:
 
   // double longitude = 2;
   void clear_longitude();
   double longitude() const;
   void set_longitude(double value);
+  private:
+  double _internal_longitude() const;
+  void _internal_set_longitude(double value);
+  public:
 
   // @@protoc_insertion_point(class_scope:google.type.LatLng)
  private:
@@ -236,13 +237,19 @@ class LatLng :
 inline void LatLng::clear_latitude() {
   latitude_ = 0;
 }
+inline double LatLng::_internal_latitude() const {
+  return latitude_;
+}
 inline double LatLng::latitude() const {
   // @@protoc_insertion_point(field_get:google.type.LatLng.latitude)
-  return latitude_;
+  return _internal_latitude();
 }
-inline void LatLng::set_latitude(double value) {
+inline void LatLng::_internal_set_latitude(double value) {
   
   latitude_ = value;
+}
+inline void LatLng::set_latitude(double value) {
+  _internal_set_latitude(value);
   // @@protoc_insertion_point(field_set:google.type.LatLng.latitude)
 }
 
@@ -250,13 +257,19 @@ inline void LatLng::set_latitude(double value) {
 inline void LatLng::clear_longitude() {
   longitude_ = 0;
 }
+inline double LatLng::_internal_longitude() const {
+  return longitude_;
+}
 inline double LatLng::longitude() const {
   // @@protoc_insertion_point(field_get:google.type.LatLng.longitude)
-  return longitude_;
+  return _internal_longitude();
 }
-inline void LatLng::set_longitude(double value) {
+inline void LatLng::_internal_set_longitude(double value) {
   
   longitude_ = value;
+}
+inline void LatLng::set_longitude(double value) {
+  _internal_set_longitude(value);
   // @@protoc_insertion_point(field_set:google.type.LatLng.longitude)
 }
 

+ 17 - 0
Firestore/core/src/remote/grpc_connection.cc

@@ -17,6 +17,7 @@
 #include "Firestore/core/src/remote/grpc_connection.h"
 
 #include <algorithm>
+#include <cstdlib>
 #include <mutex>  // NOLINT(build/c++11)
 #include <string>
 #include <utility>
@@ -122,6 +123,22 @@ HostConfigMap& Config() {
   return config_by_host_;
 }
 
+#if __APPLE__
+// Disable CFStream-based transport on Apple platforms due to b/133182964, where
+// CFStream will occasionally fail to raise a has-bytes-available events,
+// causing Firestore to appear to hang.
+//
+// Use a constructor of a globally scoped object to set the `grpc_cfstream`
+// environment variable before `main` is invoked. This should be early enough
+// that it precedes any call of gRPC APIs.
+class DisableGrpcCFStream {
+ public:
+  DisableGrpcCFStream() {
+    setenv("grpc_cfstream", "0", 1);
+  }
+} disable;
+#endif  // __APPLE__
+
 }  // namespace
 
 GrpcConnection::GrpcConnection(

Файловите разлики са ограничени, защото са твърде много
+ 1420 - 1784
Firestore/core/src/remote/grpc_root_certificates_generated.cc


+ 2 - 1
Firestore/core/test/unit/remote/grpc_stream_tester.cc

@@ -203,7 +203,8 @@ GrpcStreamTester::GrpcStreamTester(
     const std::shared_ptr<AsyncQueue>& worker_queue,
     ConnectivityMonitor* connectivity_monitor)
     : worker_queue_{NOT_NULL(worker_queue)},
-      database_info_{DatabaseId{"foo", "bar"}, "", "", false},
+      database_info_{DatabaseId{"foo", "bar"}, "", "firestore.googleapis.com",
+                     false},
       fake_grpc_queue_{&grpc_queue_},
       grpc_connection_{database_info_, worker_queue, fake_grpc_queue_.queue(),
                        connectivity_monitor} {

+ 6 - 3
cmake/external/CMakeLists.txt

@@ -1,4 +1,4 @@
-# Copyright 2018 Google
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5.1)
 project(Firebase-download C CXX)
 
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
@@ -25,9 +25,12 @@ set(
 
 include(abseil-cpp)
 include(benchmark)
+include(boringssl)
+include(c-ares)
 include(googletest)
 include(grpc)
 include(leveldb)
+include(libfuzzer)
 include(nanopb)
 include(protobuf)
-include(libfuzzer)
+include(zlib)

+ 2 - 2
cmake/external/abseil-cpp.cmake

@@ -14,7 +14,7 @@
 
 include(ExternalProject)
 
-set(version 20190808)
+set(version 20200225)
 
 ExternalProject_Add(
   abseil-cpp
@@ -22,7 +22,7 @@ ExternalProject_Add(
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
   DOWNLOAD_NAME abseil-cpp-${version}.tar.gz
   URL https://github.com/abseil/abseil-cpp/archive/${version}.tar.gz
-  URL_HASH SHA256=8100085dada279bf3ee00cd064d43b5f55e5d913be0dfe2906f06f8f28d5b37e
+  URL_HASH SHA256=728a813291bdec2aa46eab8356ace9f75ac2ed9dfe2df5ab603c4e6c09f1c353
 
   PREFIX ${PROJECT_BINARY_DIR}
 

+ 6 - 12
cmake/external/boringssl.cmake

@@ -1,4 +1,4 @@
-# Copyright 2018 Google
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,26 +18,20 @@ if(TARGET boringssl)
   return()
 endif()
 
-# This ExternalProject unpacks itself inside the gRPC source tree. CMake clears
-# the SOURCE_DIR when unpacking so this must come after grpc despite the fact
-# that grpc logically depends upon this.
-
-# grpc v1.24.3 includes boringssl at b29b21a81b32ec273f118f589f46d56ad3332420
-# (2018-05-22). This is woefully out of date, so pin to a newer one.
-set(commit 9638f8fba961a593c064e3036bb580bdace29e8f)  # master@{2019-10-01}
+# Based on https://github.com/grpc/grpc/blob/v1.27.0/bazel/grpc_deps.bzl
+# master-with-bazel@{2019-10-18}
+set(commit 83da28a68f32023fd3b95a8ae94991a07b1f6c62)
 
 ExternalProject_Add(
   boringssl
-  DEPENDS
-    grpc-download
 
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
   DOWNLOAD_NAME boringssl-${commit}.tar.gz
   URL https://github.com/google/boringssl/archive/${commit}.tar.gz
-  URL_HASH SHA256=cfd843fda9fdf9ea92b1ae5f5d379ec7d7cb09d5c7d41197ee935a0e30aecb23
+  URL_HASH SHA256=781fa39693ec2984c71213cd633e9f6589eaaed75e3a9ac413237edec96fd3b9
 
   PREFIX ${PROJECT_BINARY_DIR}
-  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc/third_party/boringssl
+  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/boringssl
 
   CONFIGURE_COMMAND ""
   BUILD_COMMAND     ""

+ 8 - 11
cmake/external/c-ares.cmake

@@ -1,4 +1,4 @@
-# Copyright 2018 Google
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,23 +18,20 @@ if(TARGET c-ares)
   return()
 endif()
 
-# The gRPC build fails if c-ares is not present in its expected location so
-# this ExternalProject unpacks itself inside the gRPC source tree. CMake clears
-# the SOURCE_DIR when unpacking so this must come after the grpc
-# ExternalProject.
+# Based on https://github.com/grpc/grpc/blob/v1.27.0/bazel/grpc_deps.bzl
+# v1.15.0, master@{2018-10-23}
+set(commit e982924acee7f7313b4baa4ee5ec000c5e373c30)
 
 ExternalProject_Add(
   c-ares
 
-  DEPENDS
-    grpc-download
-
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
-  URL https://github.com/c-ares/c-ares/archive/cares-1_14_0.tar.gz
-  URL_HASH SHA256=62dd12f0557918f89ad6f5b759f0bf4727174ae9979499f5452c02be38d9d3e8
+  DOWNLOAD_NAME c-ares-${commit}.tar.gz
+  URL https://github.com/c-ares/c-ares/archive/${commit}.tar.gz
+  URL_HASH SHA256=e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a
 
   PREFIX ${PROJECT_BINARY_DIR}
-  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc/third_party/cares/cares
+  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/cares
 
   CONFIGURE_COMMAND ""
   BUILD_COMMAND     ""

+ 7 - 31
cmake/external/grpc.cmake

@@ -1,4 +1,4 @@
-# Copyright 2018 Google
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,13 +18,15 @@ if(TARGET grpc)
   return()
 endif()
 
+set(version 1.28.0)
+
 ExternalProject_Add(
-  grpc-download
+  grpc
 
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
-  DOWNLOAD_NAME grpc-1.24.3.tar.gz
-  URL https://github.com/grpc/grpc/archive/v1.24.3.tar.gz
-  URL_HASH SHA256=c84b3fa140fcd6cce79b3f9de6357c5733a0071e04ca4e65ba5f8d306f10f033
+  DOWNLOAD_NAME grpc-${version}.tar.gz
+  URL https://github.com/grpc/grpc/archive/v${version}.tar.gz
+  URL_HASH SHA256=d6277f77e0bb922d3f6f56c0f93292bb4cfabfc3c92b31ee5ccea0e100303612
 
   PREFIX ${PROJECT_BINARY_DIR}
   SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc
@@ -33,30 +35,4 @@ ExternalProject_Add(
   BUILD_COMMAND ""
   TEST_COMMAND ""
   INSTALL_COMMAND ""
-
-  # TODO(b/136119129): Get a common version of nanopb with gRPC.
-  # We need to resolve how to arrange for gRPC and Firestore to get a common
-  # version of nanopb.
-  PATCH_COMMAND sed -i.bak "/third_party\\/nanopb/ d" ${PROJECT_BINARY_DIR}/src/grpc/CMakeLists.txt
-)
-
-# gRPC depends upon these projects, so from an IWYU point of view should
-# include these files. Unfortunately gRPC's build requires these to be
-# subdirectories in its own source tree and CMake's ExternalProject download
-# step clears the source tree so these must be declared to depend upon the grpc
-# target. ExternalProject dependencies must already exist when declared so
-# these must come after the ExternalProject_Add block above.
-include(boringssl)
-include(c-ares)
-include(protobuf)
-include(zlib)
-
-add_custom_target(
-  grpc
-  DEPENDS
-    boringssl
-    c-ares
-    grpc-download
-    protobuf
-    zlib
 )

+ 8 - 12
cmake/external/protobuf.cmake

@@ -1,4 +1,4 @@
-# Copyright 2018 Google
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,24 +18,20 @@ if(TARGET protobuf)
   return()
 endif()
 
-# This ExternalProject unpacks itself inside the gRPC source tree. CMake clears
-# the SOURCE_DIR when unpacking so this must come after grpc despite the fact
-# that grpc logically depends upon this.
-
-set(version 3.9.2)
+# Based on https://github.com/grpc/grpc/blob/v1.27.0/bazel/grpc_deps.bzl
+# v3.11.4, master@{2020-01-15}
+set(commit 29cd005ce1fe1a8fabf11e325cb13006a6646d59)
 
 ExternalProject_Add(
   protobuf
-  DEPENDS
-    grpc-download
 
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
-  DOWNLOAD_NAME protobuf-${version}.tar.gz
-  URL https://github.com/google/protobuf/archive/v${version}.tar.gz
-  URL_HASH SHA256=1fbf1c2962af287607232b2eddeaec9b4f4a7a6f5934e1a9276e9af76952f7e0
+  DOWNLOAD_NAME protobuf-${commit}.tar.gz
+  URL https://github.com/protocolbuffers/protobuf/archive/${commit}.tar.gz
+  URL_HASH SHA256=51398b0b97b353c1c226d0ade0bae80c80380e691cba7c1a108918986784a1c7
 
   PREFIX ${PROJECT_BINARY_DIR}
-  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc/third_party/protobuf
+  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/protobuf
 
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""

+ 6 - 6
cmake/external/zlib.cmake

@@ -1,4 +1,4 @@
-# Copyright 2018 Google
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -25,18 +25,18 @@ if(ZLIB_FOUND)
   return()
 endif()
 
+set(version 1.2.11)
+
 ExternalProject_Add(
   zlib
-  DEPENDS
-    grpc-download
 
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
-  DOWNLOAD_NAME zlib-v1.2.11.tar.gz
-  URL https://github.com/madler/zlib/archive/v1.2.11.tar.gz
+  DOWNLOAD_NAME zlib-v${version}.tar.gz
+  URL https://github.com/madler/zlib/archive/v${version}.tar.gz
   URL_HASH SHA256=629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff
 
   PREFIX ${PROJECT_BINARY_DIR}
-  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc/third_party/zlib
+  SOURCE_DIR ${PROJECT_BINARY_DIR}/src/zlib
 
   CONFIGURE_COMMAND ""
   BUILD_COMMAND     ""

Някои файлове не бяха показани, защото твърде много файлове са промени